#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
  #include "settings/debug.cpp"
  #define _GLIBCXX_DEBUG
#else
  #define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;

int main() {
  // https://ja.wikipedia.org/wiki/%E3%82%A4%E3%83%B3%E3%83%89%E3%82%BE%E3%82%A6#%E5%85%AC%E5%BC%8F
  int h, _h, r, _r;
  scanf("%d.%d %d.%d", &h, &_h, &r, &_r);
  double ans = -825400 + 6807 * (h * 100 + _h);
  ans += 7073 * 2 * (r * 100 + _r) * acos(-1);
  ans /= 1e5;
  cout << fixed << setprecision(15) << ans << endl;
  return 0;
}