Create a program that outputs the surface area S of a square cone with a height of h, with a square with one side x as the base. However, assume that the line segment connecting the apex and the center of the base is orthogonal to the base. Also, x and h are positive integers less than or equal to 100.

Input

Given multiple datasets. Each dataset is given in the following format:


x
h


When both x and h are 0, it indicates the end of input.



Output

Output S (real number) on one line for each data set. The output may contain an error of 0.00001 or less.

Example

Input

6
4
7
9
0
0


Output

96.000000
184.192455

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
from math import sqrt
while True:
	(x, h) = (int(input()), int(input()))
	if x == h == 0:
		break
	sh = sqrt((x / 2) ** 2 + h ** 2)
	print(x * x + sum([sh * x * 0.5 for _ in range(4)]))


while 1:
	x = float(input())
	h = float(input())
	if x == 0:
		break
	print(x * x + 2 * x * ((x / 2) ** 2 + h * h) ** 0.5)


import math
while True:
	x = float(input())
	if x == 0:
		break
	h = float(input())
	l = math.sqrt(0.25 * x ** 2 + h ** 2)
	print(x ** 2 + 2 * x * l)


while True:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	s = x ** 2 + x * (4 * h ** 2 + x ** 2) ** (1 / 2)
	print(s)


import math
while True:
	x = float(input())
	h = float(input())
	if x == h == 0:
		break
	f = math.hypot(1 / 2 * x, h)
	S = x ** 2 + 4 * f * x / 2
	print(S)


for x in iter(input, '0'):
	x = int(x)
	print(x * x + 2 * x * ((x / 2) ** 2 + int(input()) ** 2) ** 0.5)


while True:
	(x, h) = map(int, [input(), input()])
	if x == 0 and h == 0:
		break
	print(4 * (h * h + x / 2 * (x / 2)) ** 0.5 * x / 2 + x * x)


while True:
	x = float(input())
	h = float(input())
	if x + h == 0:
		break
	S = 0
	a = ((x / 2) ** 2 + h ** 2) ** 0.5
	S += x * x
	S += a * x * 0.5 * 4
	print(S)


import sys
import os
import math
for s in sys.stdin:
	x = int(s)
	h = int(input())
	if x == h == 0:
		break
	area = x * x + 2 * x * math.sqrt(h * h + x * x / 4)
	print(area)


while True:
	x = int(input())
	h = int(input())
	if x == h == 0:
		break
	S = x ** 2 + 2 * x * (h ** 2 + x ** 2 / 4) ** (1 / 2)
	print(S)


import math
while True:
	a = int(input())
	b = int(input())
	if a == 0:
		break
	s = a * a + 2 * a * math.sqrt(b * b + a / 2 * (a / 2))
	print(s)


import math
while 1:
	x = float(input())
	h = float(input())
	if not x and (not h):
		break
	S = x ** 2 + 2 * math.sqrt(h ** 2 * x ** 2 + 1 / 4 * x ** 4)
	print('{0:6f}'.format(S))


import math
while 1:
	x = int(input())
	h = int(input())
	if x == h == 0:
		break
	b = math.sqrt(h * h + x * x / 4) * x / 2
	print(4 * b + x * x)


while 1:
	try:
		x = int(input())
		h = int(input())
		if x == h == 0:
			break
		ans = x ** 2
		he = (h ** 2 + x ** 2 / 4) ** 0.5
		tri = he * x * 0.5
		ans += tri * 4
		print(f'{ans:.7f}')
	except:
		break


import math
while True:
	x = float(input())
	h = float(input())
	if x == 0 and h == 0:
		break
	ans = x ** 2 + math.sqrt(x ** 2 + 4 * h ** 2) * x
	print('{:.6f}'.format(ans))


import math
while True:
	X = float(input())
	H = float(input())
	if X == 0.0:
		break
	ans = 0.0
	ans += X * X
	ans += math.sqrt(H * H + X * X / 4.0) * X * 2
	print(ans)


from math import sqrt
while True:
	x = float(input())
	h = float(input())
	if x == h == 0:
		break
	ans = (sqrt(4 * h * h + x ** 2) + x) * x
	print(ans)


import math
while True:
	x = int(input())
	if x < 1:
		break
	h = int(input())
	s = math.sqrt(4 * h * h + x * x) + x
	print(s * x)


while 1:
	(x, h) = (int(input()), int(input()))
	if x:
		print(x * x + ((x / 2) ** 2 + h ** 2) ** 0.5 * x * 2)
	else:
		break


for x in iter(input, '0'):
	x = int(x)
	print(x * x + 2 * x * ((x / 2) ** 2 + int(input()) ** 2) ** 0.5)


while 1:
	try:
		x = int(input())
		h = int(input())
		if x == 0 and h == 0:
			break
		print('{:.6f}'.format(x ** 2 + ((x / 2) ** 2 + h ** 2) ** 0.5 * x * 2))
	except:
		break


from math import hypot
while True:
	(x, h) = (int(input()), int(input()))
	if x == h == 0:
		break
	print(hypot(x / 2, h) * x * 2 + x * x)


while 1:
	(x, h) = [int(input()) for i in range(2)]
	if x == 0 and h == 0:
		break
	(x, h) = [float(i) for i in [x, h]]
	tot = x ** 2 + 4 * 0.5 * x * (h ** 2 + (x / 2) ** 2) ** 0.5
	print('{:.6f}'.format(tot))


import math
while 1:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	a = math.sqrt((x / 2) ** 2 + h ** 2)
	s = a * x * 2 + x ** 2
	print(s)


import math
while True:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	tei = x * x
	tor = x * (math.sqrt(h * h + (x / 2) ** 2) * 1 / 2)
	ans = tei + 4 * tor
	print('{0:.6f}'.format(ans))


import math
while True:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	S = 1 / 2 * x * 4 * (1 / 4 * x ** 2 + h ** 2) ** 0.5 + x ** 2
	print(S)


import sys
readline = sys.stdin.readline
write = sys.stdout.write

def solve():
	x = int(readline())
	h = int(readline())
	if x == h == 0:
		return False
	write('%.16f\n' % (x * x + x * (x * x + 4 * h * h) ** 0.5))
	return True
while solve():
	...


import sys, math, os
PYDEV = os.environ.get('PYDEV')
if PYDEV == 'True':
	sys.stdin = open('sample-input.txt', 'rt')
while True:
	x = int(input())
	h = int(input())
	if x == h == 0:
		break
	h_x = math.sqrt(h ** 2 + x ** 2 / 4)
	A = x ** 2 + 2 * x * h_x
	print('%.6f' % A)


while True:
	x = float(input())
	h = float(input())
	if x == 0:
		break
	print(x * x + 2 * x * ((x / 2) ** 2 + h * h) ** 0.5)


import math
while True:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	h2 = math.sqrt(x / 2 * (x / 2) + h * h)
	print(float(x * x + 2 * x * h2))


while 1:
	(x, h) = (int(input()), int(input()))
	if x == 0:
		break
	print(x * x + ((x / 2) ** 2 + h ** 2) ** 0.5 * x * 2)


while True:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	a = x ** 2 + x * (4 * h ** 2 + x ** 2) ** (1 / 2)
	print(a)


import math
while True:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	S = 2 * x * math.sqrt(x * x / 4 + h * h) + x * x
	print(S)


while True:
	x = int(input())
	h = int(input())
	if x == h == 0:
		break
	else:
		t = (h ** 2 + (x / 2) ** 2) ** (1 / 2)
		print(x * x + x * t * 2)


while True:
	(x, h) = (int(input()), int(input()))
	if x == 0:
		break
	print(x ** 2 + x * (4 * h ** 2 + x ** 2) ** (1 / 2))


import sys
import math

def main():
	for line in sys.stdin:
		x = int(line)
		h = int(input())
		if x != 0 and h != 0:
			s1 = x * math.sqrt(4 * h ** 2 + x ** 2)
			s2 = s1 + x ** 2
			print('{:.6f}'.format(s2))
		else:
			break
main()


import math
while True:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	x = float(x)
	h = float(h)
	y = math.sqrt(h ** 2 + x ** 2 / 4.0)
	print(x ** 2 + 2.0 * x * y)


import sys
from sys import stdin
input = stdin.readline

def solve(x, h):
	ans = x * x
	diagonal = (x ** 2 + x ** 2) ** 0.5 / 2
	oblique = (diagonal ** 2 + h ** 2) ** 0.5
	s = (x + oblique + oblique) / 2
	triangle = (s * (s - x) * (s - oblique) * (s - oblique)) ** 0.5
	triangle *= 4
	ans += triangle
	return ans

def main(args):
	while True:
		x = int(input())
		h = int(input())
		if x == 0 and h == 0:
			break
		result = solve(x, h)
		print('{:.6f}'.format(result))
main(sys.argv[1:])


from math import sqrt
while 1:
	x = int(input())
	h = int(input())
	if x == 0 and h == 0:
		break
	print('{0:.8f}'.format(x * x + 2.0 * x * sqrt(h * h + 1 / 4.0 * x * x)))


import sys
f = sys.stdin
while True:
	(x, h) = (int(f.readline()) for i in range(2))
	if x == h == 0:
		break
	triangle_height = (h ** 2 + (x / 2) ** 2) ** 0.5
	s = x ** 2 + 4 * x * triangle_height / 2
	print('{:.6f}'.format(s))


while True:
	x = float(input())
	h = float(input())
	if x == 0 and h == 0:
		break
	print('%.6f' % (x ** 2 + x * 2 * (h ** 2 + (x / 2) ** 2) ** 0.5))


import math
while True:
	x = int(input().strip())
	h = int(input().strip())
	if x == 0 and h == 0:
		break
	d = math.sqrt((x / 2.0) ** 2 + h ** 2)
	s = x * d / 2.0 * 4 + x ** 2
	print(s)


import math
while True:
	try:
		x = int(input())
		h = int(input())
		if x == 0 and h == 0:
			break
		n = math.sqrt(h ** 2 + (x / 2) ** 2)
		ans = x ** 2 + x * n * 0.5 * 4
		print('{:.5f}'.format(ans))
	except EOFError:
		break