#include using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); double a, b; cin >> a >> b; double res1, res2, res; res1 = 2 * M_PI * abs(a); res2 = 2 * M_PI * abs(b); if (a * b > 0) res = abs(res1 - res2); else res = res1 + res2; cout << fixed << setprecision(15) << res << "\n"; return 0; }