#include <bits/stdc++.h>
int n, r;
double A, B, C, a, b, c, ans;
int main() {
  scanf("%d%lf", &n, &a);
  B = acos(-1) / (n + n);
  C = acos(-1) / n;
  A = acos(-1) - B - C;
  b = a * sin(B) / sin(A);
  ans = 0.5 * a * b * sin(C);
  ans *= (n + n);
  printf("%.10f", ans);
}
