#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
long long n, k;
long double L, R, H[800000];
long double SIN(long double deg) {
return sin(3.14159265358979323846264l / 180.0l*deg);
}
long long HS(long double I) {
long long L = 0, R = n, M;
while (true) {
M = (L + R) / 2;
if (H[M] <= I && H[M + 1] > I)return M;
if (M == n - 1 && H[M + 1] <= I)return n;
if (H[M] > I)R = M;
if (H[M + 1] <= I)L = M;
}
}
long long solve(long double cnt) {
long long ret = 0;
for (int i = 1; i <= n - 2; i++) {
long double I = SIN(180.0l*i / n) * 2.0l;//横幅
long double J = cnt / I * 2.0l;//最大の高さ
long double R = 0;
if (i >= n / 2)R = 1.0l + sqrtl(1.0l - (I / 2.0l)*(I / 2.0l));//線の高さ
if (i < n / 2)R = 1.0l - sqrtl(1.0l - (I / 2.0l)*(I / 2.0l));//線の高さ
long long K = HS(J + R);//許される最大のz座標
long long F = ((K - i) / 2) * 2;//何通りか
if (K == n && (n - i) % 2 == 0) { F--; }
ret += F*n * 2;
}
return ret;
}
int main() {
cin >> n >> k;
for (int i = 0; i <= n; i++)H[i] = SIN(360.0l*i / (n * 2) - 90.0l) + 1.0l;
long double L = 0, R = 1.3l, M;
for (int i = 0; i < 50; i++) {
M = (L + R) / 2.0l;
long long T = solve(M);
long long U = solve(M - 1.0l*(1.0e-10));
if (T >= k * 6 && U < k * 6) { break; }
if (U >= k * 6) { R = M; }
if (T < k * 6) { L = M; }
}
cout << fixed << setprecision(15) << M << endl;
return 0;
}