#include <bits/stdc++.h>
double a[100005];
double s[100005];
using namespace std;
int main() {
  int m, r;
  scanf("%d %d", &m, &r);
  a[1] = 2;
  double x = sqrt(2.0);
  a[2] = 2 + x;
  a[3] = 2 + 2 * x;
  for (int i = 4; i <= m; i++) {
    a[i] = a[i - 1] + 2;
  }
  s[0] = 0;
  for (int i = 1; i <= m; i++) s[i] = s[i - 1] + a[i];
  double ans = 0;
  for (int i = 1; i <= m; i++) ans += s[i] + s[m + 1 - i] - a[1];
  double result = ans * r / m / m;
  printf("%.10lf\n", result);
}
