#include<bits/stdc++.h>
using namespace std;
int main(){
double r,h,z,m,b;
const double PI= 3.1415926;
cin>>r>>h;
z=PI*2*r;
m=PI*r*r;
b=m*2+z*h;
printf("%.2f",b);
return 0;
}
/**************************************************************
Problem: 1623
User: xiaojingxuan
Language: C++
Result: Accepted
Time:13 ms
Memory:2072 kb
****************************************************************/