#include <bits/stdc++.h>
int main() {
  const double pi = acos(-1);
  double N, R;
  double Acentro, Apunta, area = 0, Aaux, Lx;
  scanf("%lf%lf", &N, &R);
  Apunta = pi / (2 * N);
  Acentro = pi / N;
  Aaux = pi - Apunta - Acentro;
  Lx = R * sin(Apunta) / sin(Aaux);
  area = R * Lx * sin(Acentro) * 0.5;
  printf("%.15f", 2 * N * area);
  return 0;
}
