Problem: 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

Solution (in JAVA):

Solution:
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    try (Scanner scanner = new Scanner(System.in)) {
      while (true) {
        double x = scanner.nextDouble();
        double h = scanner.nextDouble();
        if (x == 0 && h == 0) {
          return;
        }
        SquarePyramid squarePyramid = new SquarePyramidImpl(x, h);
        System.out.println(squarePyramid.calcSurfaceArea());
      }
    }
  }
}

interface SquarePyramid {
  double calcSurfaceArea();
}

final class SquarePyramidImpl implements SquarePyramid {

  private final double x;
  private final double h;

  SquarePyramidImpl(double x, double h) {
    this.x = x;
    this.h = h;
  }

  private double getTriangleHeight() {
    return Math.sqrt(Math.pow(x / 2, 2) + Math.pow(h, 2));
  }

  @Override
  public double calcSurfaceArea() {
    return Math.pow(x, 2) + getTriangleHeight() * x * 2.0;
  }
}