while 1:

    x=eval(input())

    h=eval(input())

    if x==0 and h==0: break

    a=float(x)/2

    s=((a*a+h*h)**0.5 * 2 + x)*x

    print(s)
while 1:

    x,h = eval(input()),eval(input())

    if x==0 and h==0: break

    a=float(x)/2

    s=x*x+2*x*(a*a+h*h)**0.5

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

while 1:
    x, h = eval(input()), eval(input())
    if x == 0 and h == 0:
        break
    a = float(x) / 2
    s = x * x + 2 * x * (a * a + h * h) ** 0.5
    print(s)

-    x = eval(input()) -    h = eval(input()) +    x, h = eval(input()), eval(input()) -    s = ((a * a + h * h) ** 0.5 * 2 + x) * x +    s = x * x + 2 * x * (a * a + h * h) ** 0.5