#include<bits/stdc++.h>
using namespace std;
int main(){
double r,h,d,s,pi=3.1415926,l;
cin>>r>>h;
s=pi*r*r;
l=pi*2*r;
d=s*2+h*l;
printf("%.2lf",d);
}
/**************************************************************
Problem: 1623
User: tonghuawei
Language: C++
Result: Accepted
Time:14 ms
Memory:2072 kb
****************************************************************/