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