import math
def getLength(x,y):
	return math.sqrt(2)*(x+y)
inputs = [] 
while(True):
	inp = input()
	inp2 = inp.split()
	if(inp == ""):
		break
	inputs.append(list(map(int, inp2)))
maxlength=0.
for i in inputs:
	if(len(i) == 1):
		if(maxlength!=0):
			print(maxlength)
			maxlength = 0
	else:
		
		p = getLength(i[0],i[1])
		if maxlength<p:
			print()
			maxlength = p
print(maxlength)
exit()


