import math pi = 3.14159265358979323846264338 a = float(input()) b = float(input()) if a * b <= 0: print(2*pi*(a*a+b*b)) else: print(2*pi*(b*b-a*a))