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