#include<bits/stdc++.h>
using namespace std;

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

typedef long double D;
typedef complex<D>P;
const D PI=acos(-1);


int N,K;
P p[222222];

inline D cross(const P &p,const P &q){
    return real(p)*imag(q)-imag(p)*real(q);
}

inline D getS(int i,int j,int k){
    return abs(cross(p[j]-p[i],p[k]-p[i]))/2;
}

bool C(D s){
    int cnt=0;
    for(int i=1;i<N-1;i++){
        int lb=-1,ub=(i+1)/2;
        while(ub-lb>1){
            int mid=(ub+lb)/2;
            if(getS(N-1,i,mid)>s)ub=mid;
            else lb=mid;
        }
        cnt+=ub*2;
        if(i%2&&ub==(i+1)/2)cnt--;
    }

    if(N%3==0&&getS(0,N/3,N/3*2)<=s)cnt+=2;
    cnt/=3;
    cnt*=N;
    return cnt>=K;
}

signed main(){
    cin>>N>>K;

    for(int i=0;i<N;i++)p[i]=polar((D)1.0,2*PI/N*i);

    D lb=0.0,ub=2*PI;

    for(int i=0;i<50;i++){
        double mid=(ub+lb)/2;
        if(C(mid))ub=mid;
        else lb=mid;
    }

    cout<<setprecision(10);
    cout<<ub<<endl;
    return 0;
}
