#include<bits/stdc++.h>
using namespace std;
int main(){
	float 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("%.2f",d);
  }
/**************************************************************
	Problem: 1623
	User: tonghuawei
	Language: C++
	Result: Wrong Answer
****************************************************************/