h,r=map(float,input().split()) r*=6.28 print(-8.245+6.807*h+7.073*r)