#include <bits/stdc++.h>

using namespace std;

const double eps = 1e-10;
const double PI = acos(-1.0);
const int N = 2e5 + 10;

typedef long long LL;

int n;
LL k;
double ssin[N], ccos[N];

int dcmp(double x){
	if(fabs(x)<eps)	return 0;
	return x < 0 ? -1 : 1;
}

inline double sqr(double x){
	return x * x;
}

bool chk(double dx, double dy, int p, double s){
    double xc = ccos[p] - 1.0;
    double yc = ssin[p];

    double g = dx * yc - dy * xc;
    g = fabs(g) * 0.5;

	return dcmp(g - s) <= 0;
}

LL cal(int i, int l, int r, double s){
    if(l > r)	return 0;
    int len = r - l + 1;
    LL ret = 0, ret1 = 0;

    double dx = ccos[i] - 1.0;
    double dy = ssin[i];

    if(len & 1){
		ret1 = chk(dx, dy, l + r >> 1, s);
    }

    r = l + len / 2 - 1;
    int ll = l;

    int mid, key = l - 1;
    while(l <= r){
		mid = l + r >> 1;
        if(chk(dx, dy, mid, s)){
            key = max(key, mid);
            l = mid + 1;
        } else {
			r = mid - 1;
        }
    }

    ret = key - ll + 1;

	return ret * 2 + ret1;
}

bool ok(double s){
	LL sum = 0;
    for(int i=1; i<n; i++){
        sum = sum + cal(i, i+1, n-1, s);
        sum = sum + cal(i, 1, i-1, s);
    }
    sum = sum * n / 6;
    return sum >= k;
}

int main(){
	while(~scanf("%d %lld", &n, &k)){
		for(int i=0; i<n; i++){
            ssin[i] = sin(2.0*PI * i / n);
            ccos[i] = cos(2.0*PI * i / n);
		}

        double low=0.0, top=PI, ans=top, mid;
        while(top - low > eps){
			mid = (low + top) * 0.5;
            if(ok(mid)){
				ans = min(ans, mid);
				top = mid - eps;
            } else {
				low = mid + eps;
            }
        }
        printf("%.12f\n", ans);
	}
	return 0;
}
