#include <bits/stdc++.h>
int main() {
  double n, r;
  long double PI = 3.14159265358979323846;
  double area;
  scanf("%lf%lf", &n, &r);
  area = (n * r * r) / ((1 / tan(PI / (2 * n))) + (1 / tan(PI / n)));
  printf("%.12f", area);
}
