//
//  main.cpp
//  kyougi
//
//  Created by 寺林 一旭 on 2018/08/27.
//  Copyright © 2018年 寺林 一旭. All rights reserved.
//

#include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <map>
#include <complex>
using namespace std;
int main() {
    
    float num;
    
    vector<int> list;
  
    float teimen = 0;
    float takasa = 0;
    int cnt = 0;
    while(cin >> num) //getline(cin, num))
    {
        if ( cnt == 2)
        {
            cnt =0;
        }
        if ( cnt == 0)
        {
            teimen = num;
        }
        if( cnt == 1)
        {
            takasa = num;
          
            float seihou = teimen* teimen;
            float teimenhalf = teimen/2.f;
            float sanhei = sqrt((takasa*takasa) - (teimenhalf*teimenhalf));
            float sankaku = (teimen * sanhei) /2.f * sanhei;
            
            
        
            cout <<seihou + sankaku<< endl;

            
        }
        
        
        cnt ++;
    }
  
    
    return 0;
}

