#include <bits/stdc++.h>
long long sum1(long long n) { return n ? n * (n - 1) + 2 : 0; }
long long sum2(long long n) { return n ? 2 * n - 1 : 0; }
int main() {
  int m, R;
  scanf("%d%d", &m, &R);
  long long s1 = 2 * m, s2 = 0;
  for (int i = 1; i <= m; ++i) {
    s1 += sum1(i - 1) + sum1(m - i);
    s2 += sum2(i - 1) + sum2(m - i);
  }
  double ans = (s1 + s2 * sqrt(2)) * R / m / m;
  printf("%.8f\n", ans);
}
