#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include<bits/stdc++.h> using namespace std; const double pi=acos(-1); int main(){ double h,r; cin>>h>>r; double s=-8.245 + 6.807 * h + 7.073 * r*pi*2; cout<<fixed<<setprecision(15)<<s<<endl; return 0; }