from math import pi h,r=map(float,input().split()) r=pi*r*2 print(-8.245+6.807*h+7.073*r)