#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    double h,r;
    cin >> h >> r;
    double res = -8.245 + 6.807 * h + 7.073 * r * 2 * 3.1415926535;
    cout << fixed << setprecision(10) << res << endl;
}