#include<bits/stdc++.h>
using namespace std;
int main(){
int r;
float pi=3.1415926,s,h,m,c;
cin>>r>>h;
c=pi*2*r;
s=r*r*pi;
m=s*2+c*h;
printf("%.2f",m);
}
/**************************************************************
Problem: 1623
User: toughuatao1
Language: C++
Result: Wrong Answer
****************************************************************/