Problem: Problem

Find the area of ​​a regular N / K polygon inscribed in a circle with a radius of 1.

However, a regular N / K polygon is defined as "the outermost figure that takes N points on the circumference at equal intervals and connects each point every K-1".

For example, a 5/2 polygon can be drawn as follows. First, take five points at equal intervals on the circumference of radius 1.

Sample Input 2 diagram


Next, connect each point every other 2-1 = 1.

Sample Input 2 diagram


The outermost figure is a regular 5/2 square.

Sample Input 2 diagram

Constraints

The input satisfies the following constraints.

* 5 ≤ N ≤ 106
* 1 <K <N / 2
* N and K are integers that are relatively prime

Input

The input is given in the following format.


N K


Two integers N and K are given on one line.

Output

Output the area of ​​a regular N / K polygon inscribed in a circle with a radius of 1 on one line. An error of 10-5 or less is acceptable.

Examples

Input

5 2


Output

1.12256994


Input

20 3


Output

2.93114293


Input

7 3


Output

1.08395920


Input

100000 3


Output

3.14159265

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
using namespace std;
#define EPS (1e-10)
#define equals(a,b) (fabs((a)-(b)) < EPS)

static const double PI = 3.14159265358979;
 
struct Point{
  double x,y;
  Point(){}
  Point(double x,double y):x(x),y(y){}
  
  Point operator+(Point p){return Point(x+p.x,y+p.y);}
  Point operator-(Point p){return Point(x-p.x,y-p.y);}
  Point operator*(double k){return Point(x*k,y*k);}
  Point operator/(double k){return Point(x/k,y/k);}
   
  double norm(){return x*x+y*y;}
  double abs(){return sqrt(norm());}
 
  bool operator<(const Point &p) const{
    return x!=p.x? x< p.x : y < p.y;
  }
 
  bool operator==(const Point &p) const{
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS ;
  }
};
 
typedef Point Vector;
 
struct Segment{
  Point p1,p2;
  Segment(Point p1,Point p2):p1(p1),p2(p2){}
};

double cross(Vector a,Vector b){
  return a.x*b.y-a.y*b.x;
}
typedef vector<Point> Polygon;


Point getCrossPoint(Segment s1,Segment s2){
  Vector base = s2.p2 - s2.p1;
  double d1 = fabs(cross(base,s1.p1-s2.p1));
  double d2 = fabs(cross(base,s1.p2-s2.p1));
  double t = d1 / (d1+d2);
  return s1.p1 + (s1.p2 - s1.p1) * t;
}

Point getCrossPoint(Point p0,Point p1,Point p2,Point p3){
  return getCrossPoint(Segment(p0,p1),Segment(p2,p3));
}

int main(){
  int n,k;
  cin >> n >> k;
  Polygon v,c;
  int i;
  int d[4]={0,k,1,1-k};
  for(i=0;i<4;i++){
    double x=2*PI/n*d[i];
    v.push_back(Point(cos(x),sin(x)));
  }
  c.push_back(getCrossPoint(v[0],v[1],v[2],v[3]));
  printf("%.8lf\n",cross(v[0],c[0])*n);
  return 0;
}