#!/usr/bin/python2 # -*- coding: utf-8 -*- # † from math import pi # [0, x] の範囲の表面積。x >= 0 であること def f(x): return 2 * pi * x def sign(x): if x == 0: return 1 return abs(x) / x a = float(raw_input()) b = float(raw_input()) if sign(a) == sign(b): mini, maxi = sorted([abs(a), abs(b)]) res = f(maxi) - f(mini) else: res = f(abs(a)) + f(abs(b)) print res