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