#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000 + 7;
const double EPS = 1e-9;
const double PI = acos(-1.0);
template <class T>
int chmin(T &t, T f) {
  return (t > f) ? (t = f, 1) : 0;
}
template <class T>
int chmax(T &t, T f) {
  return (t < f) ? (t = f, 1) : 0;
}
inline int getint() {
  int a;
  return scanf("%d", &a) ? a : (fprintf(stderr, "trying to read\n"), -1);
}
inline double getdouble() {
  double a;
  return scanf("%lf", &a) ? a : (fprintf(stderr, "trying to read\n"), -1);
}
void myCode() {
  int n = getint(), r = getint();
  double ret = 0;
  ret += n * 2 * r;
  ret += 2 * (n - 1) * (2 + sqrt(2)) * r;
  for (int i = (int)2; i < (int)n; i++) {
    ret += 2 * (n - i) * (2 * (i - 1) + 2 * sqrt(2)) * r;
  }
  printf("%.9lf\n", ret / n / n);
}
int main() {
  myCode();
  return 0;
}
