//1=31,2=29,3=31,4=30,5=31,6=30,7=31,8=31,9=30,10=31,11=30,12=31//
#include <iostream>
#include<string>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
    double x,s,h;
    while(cin>>x>>h){
        if(x==0&&h==0)break;
        s=x*x+4*(x*h*1/2);
        printf("%.6f?\n",s);
    }
    return 0;
}