#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<cstdio>
using namespace std;
vector<long double>vec;long long n,k;
struct Point{long double px,py;};
long double SIN(long double r){return sin(3.14159265358979323846l/180.0l*r);}
long double COS(long double r){return cos(3.14159265358979323846l/180.0l*r);}
long double dst(Point a,Point b){return sqrtl((b.px-a.px)*(b.px-a.px)+(b.py-a.py)*(b.py-a.py));}
int main(){
cin>>n>>k;k*=6;
for(int i=0;i<=0;i++){
for(int j=1;j<n;j++){
for(int k=1;k<n;k++){
if(j==k)continue;
Point p1=Point{SIN(360.0l*i/n),COS(360.0l*i/n)};
Point p2=Point{SIN(360.0l*j/n),COS(360.0l*j/n)};
Point p3=Point{SIN(360.0l*k/n),COS(360.0l*k/n)};
long double d1=dst(p1,p2);
long double d2=dst(p1,p3);
long double d3=dst(p2,p3);
long double d4=(d1+d2+d3)/2.0l;
long double d5=sqrtl(d4*(d4-d1)*(d4-d2)*(d4-d3));
vec.push_back(d5);
}
}
}
sort(vec.begin(),vec.end());
printf("%.15Lf\n",vec[(k+n-1)/n-1]);
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGFsZ29yaXRobT4KI2luY2x1ZGU8dmVjdG9yPgojaW5jbHVkZTxjbWF0aD4KI2luY2x1ZGU8Y3N0ZGlvPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp2ZWN0b3I8bG9uZyBkb3VibGU+dmVjO2xvbmcgbG9uZyBuLGs7CnN0cnVjdCBQb2ludHtsb25nIGRvdWJsZSBweCxweTt9Owpsb25nIGRvdWJsZSBTSU4obG9uZyBkb3VibGUgcil7cmV0dXJuIHNpbigzLjE0MTU5MjY1MzU4OTc5MzIzODQ2bC8xODAuMGwqcik7fQpsb25nIGRvdWJsZSBDT1MobG9uZyBkb3VibGUgcil7cmV0dXJuIGNvcygzLjE0MTU5MjY1MzU4OTc5MzIzODQ2bC8xODAuMGwqcik7fQpsb25nIGRvdWJsZSBkc3QoUG9pbnQgYSxQ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