#include<bits/stdc++.h>
using namespace std;
int main(){
float r,h;
cin>>r>>h;
printf("%.2f",(3.1415926*r*r)*2+(3.1415926*2*r)*h);
}
/**************************************************************
Problem: 1623
User: linzihang
Language: C++
Result: Accepted
Time:16 ms
Memory:2072 kb
****************************************************************/