Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func main() {
	mountHeightList := make([]int64, 10)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 10; i++ {
		scanner.Scan()
		mountHeightList[i], _ = strconv.ParseInt(scanner.Text(), 10, 64)
	}

	sort.Slice(mountHeightList, func(i, j int) bool { return mountHeightList[i] > mountHeightList[j] })

	for i := 0; i < 3; i++ {
		fmt.Printf("%d\n", mountHeightList[i])
	}
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<functional>
#include<queue>
#include<math.h>
#define INF 999999

using namespace std;

int main()
{
	int h[11];

	for (int i = 0; i < 10; i++) {
		cin >> h[i];
	}
	sort(h, h + 10, greater<int>());

	for (int i = 0; i < 3; i++) {
		cout << h[i] << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

int main(){
	vector<int> v;
	for(int i = 0; i < 10; i++){
		int input;
		cin >> input;
		v.push_back(input);
	}

	sort(v.begin(), v.end(), greater<int>());

	cout << v.at(0) << endl << v.at(1) << endl << v.at(2) << endl;

	return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
	for(int i = 1 ; i <= 9 ; i++){
		for(int j = 1 ; j <= 9 ; j++)
			cout << i << "x" << j << "=" << i*j << endl;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  int h;
  while (cin >> h) {
    v.push_back(h);
  }
  sort(v.begin(), v.end());
  int s = v.size();
  cout << v[s-1] << endl << v[s-2] << endl << v[s-3] << endl;
}

C++: #include<iostream>
using namespace std;
  
int main(void){
  
  int h[10];
　int a = 0;
  
  std::cin >> h;
  
  for(int j=0; j<3; j++){
    for(int i=0; i<10; i++){
        if(a<h[i]) a = i;
    }
    cout << h[a] << endl; 
    h[a] = 0;
  }  
  
  return 0;
}

C++: #include<iostream>
#include<utility>
#include<climits>
using namespace std;

int main(){
	
	int height[10] = {};

	for(int i = 0; i < 10; i++){
		cin >> height[i];
	}

	int f = INT_MIN, s = INT_MIN, t = INT_MIN;

	for (int i = 0; i < 9; i++){
		if (height[i] >= t){
			t = height[i];
		}
		if (t >= s){
			swap(s, t);
		}
		if (s >= f){
		swap(f,s);
		}
	}
    
	cout << f << "\n" << s << "\n" << t << endl;

		return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

int main(){
	
	//use vector
	std::vector<int> height(10); // create height[10]
	
	// input
	for(int i = 0; i < 10; ++i){
		std::cin >> height[i];
	}
	
	//sort
	std::sort(height.begin(), height.end(), std::greater<int>());
	
	//output
	for(int i = 0; i < 3; ++i){
		std::cout << height[i] << std::endl;
	}
	
	return 0;
}

C++: #include <iostream>
using namespace std;

int main(void)
{
    int a;
    int b[3];
    for (int i = 0; i < 10; i++)
    {
        cin >> a;
        if(a>b[0])
        {
            b[2] = b[1];
            b[1] = b[0];
            b[0] = a;
        }
        else if(a>b[1])
        {
            b[2] = b[1];
            b[1] = a;
        }
        else if(a>b[2])
        {
            b[2] = a;
        }

    }

    for (int i = 0; i < 3; i++)
    {
        cout << b[i] << "\n";
    }

}

C++: #include<iostream>
using namespace std;
void swap (int &x,int &y)
{
 int t;
 if(x>y)
 {
 	t=y;y=x;x=t;
 }	
}
int main()
{
	int a[10],i,j;
	cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]>>a[6]>>a[7]>>a[8]>>a[9];
	for(i=0;i<10;i++)
	{
		if(a[i]<0||a[i]>10000)return 0;
	}
	for(j=9;j>6;j--)
	{
		for(i=0;i<j;i++)
		swap(a[i],a[i+1]);
	}
	cout<<a[9]<<endl<<a[8]<<endl<<a[7];
	return 1;
}

C++: #include <iostream>
using namespace std;

int main(){

	int hight[10];
	int num;
	int baffer;
	int flag=1;

	for(num=0;num!=10;num++)
	{
		cin>>hight[num];
	};

	while(flag!=0){
		flag=0;
	for(num=0;num!=10;num++)
	{	if(num=9)break;
		if(hight[num]<hight[(num+1)]){

		baffer=hight[num];
		hight[num]=hight[(num+1)];
		hight[(num+1)]=baffer;

		flag++;}
		
	};

	};

	cout<<hight[9]<<endl;
	cout<<hight[8]<<endl;
	cout<<hight[7]<<endl;

return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>

#define BOGO 10

using namespace std;

bool is_sorted(vector<int> arr, int size)
{
	bool sorted = true;
	for(int i = 0; i < size; i++){
		if(!(arr[i] <= arr[i+1])){
			sorted = false;
		}
	}
	
	return sorted;
}

int main()
{
	vector<int> arr(BOGO);
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		if(is_sorted(arr, arr.size())){
			break;
		}
		random_shuffle(arr.begin(), arr.end());
	}
	
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

C++: #include <iostream>
using namespace std;
int main()
{
    int a[10];
    int i;
    for(i=0;i<10;i++){
        cin>>a[i];
    }
    for(i=0;i<10;i++){
        for(int j=0;j<9;j++){
            if(a[j]<a[j+1]){
                int tmp;
                tmp=a[j];
                a[j]=a[j+1];
                a[j+1]=tmp;
            }
        }
    }
    for(i=0;i<3;i++){
        cout<<a[i]<<endl;
    }
    return 0;



}

C++: #include <iostream>
#include <array>
#include <algorithm>
  
int main(){
    std::array<u_int, 10> heights;
     
    for (u_int i = 0; i < 10; ++i){
        std::cin >> heights[i];
    }
     
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
     
    for (u_int i = 0; i < 3; ++i){
        std::cout << heights[i] << std::endl;
    }
	
    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
 
int main(){
  int m[10];
  for(int i=0;i<10;i++)
    cin >> m[i];
  sort(m,m+10);
  cout << m[9] << endl << m[8] << endl << m[7] << endl;
}

C++: #include<iostream>
using namespace std;

void swap(int x,int y) {
	int temp = x;
	x = y;
	y = temp;
}
void bubblesort(int a[]) {
	int length = sizeof(a) / sizeof(a[0]);
	for (int i=0; i < length; i++) {
		for (int j=0; j < length - 1; j++) {
			if (a[j] < a[j+1]) {
				swap(a[j],a[j+1]);
			}
		}
	}
}

int main() {
	int a[10];
	for (int i = 0;i < 10; i++) {
		cin >> a[i];
	}
	bubblesort(a);
	for (int t=9; t >= 7; t--) {
		cout << a[t] << endl;
	}
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  double x, h;
  while (cin >> x >> h, x) {
    cout << prec(8) << x * x + x * hypot(h, x / 2) * 2 << endl;
  }
}