#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.14159265358979323846;
int main() {
  long double n, r;
  cin >> n >> r;
  long double a = 2 * PI / n;
  long double b = PI - 3 * a / 4;
  long double first = r * sin(a / 2) / sin(b);
  long double ans = 0.5 * first * r * sin(a / 4) * 2 * n;
  cout << fixed << setprecision(15) << ans;
}
