#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
double Table[MAX];
double E[MAX];
int n, R;
int main() {
  scanf("%d %d", &n, &R);
  E[1] = 2 * R;
  Table[1] = (double)2 * R + (double)R * sqrt(2.0);
  Table[2] = Table[1] + (double)R * sqrt(2.0);
  double sum = Table[1];
  for (int i = 2; i <= n; i++) {
    E[i] = E[i - 1] + 2 * sum + 2 * R;
    if (i != 2) Table[i] = Table[i - 1] + (double)2 * R;
    sum += (double)Table[i];
  }
  printf("%.10lf\n", E[n] / (double)n / (double)n);
  return 0;
}
