#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

#define sq(a) (a*a)

int main() {
  
  double x, h;

  while(cin>>x>>h) {
    cout << setprecision(100) << sq(x)+ x * ( sqrt(sq(x/2)+sq(h)) ) * 2 << endl;
  }
  
  return 0;
}