#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
int n, r;
double answer = 0;
void input() { cin >> n >> r; }
void output() {
  cout.precision(7);
  cout << fixed;
  cout << answer;
}
void process() {
  double s = 90.0 - 180.0 / (double)n;
  double cs = cos(s * 3.14159265358979323846 / 180.0);
  double aa = r * cs;
  double bb = 1 - cs;
  answer = aa / bb;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  input();
  process();
  output();
  return 0;
}
