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 rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<pair<int, int> > vpii; typedef long long ll;
template<typename T, typename U> static void amin(T &x, U y) { if(y < x) x = y; }
template<typename T, typename U> static void amax(T &x, U y) { if(x < y) x = y; }

typedef complex<double> Point;

double cross(Point a, Point b) {
	return (conj(a) * b).imag();
}

Point crosspoint(Point aa, Point ab, Point ba, Point bb) {
	double A = cross(ab - aa, bb - ba), B = cross(ab - aa, ab - ba);
	return ba + B / A * (bb - ba);
}

double area(Point a, Point b, Point c) {
	return abs(cross(a, b) + cross(b, c) + cross(c, a)) / 2;
}

int main() {
	const double PI = acos(-1.);
	int N; int K;
	while(~scanf("%d%d", &N, &K)) {
		double theta = 2 * PI / N;
		Point A = polar(1.0, 0 * theta), B = polar(1.0, 1 * theta);
		Point C = polar(1.0, K * theta), D = polar(1.0, (1 - K) * theta);
		Point E = crosspoint(A, C, B, D);
		double T = area(Point(0, 0), A, E);
		double P = PI / N - T * 2;
		double ans = PI - P * N;
		printf("%.10f\n", ans);
	}
	return 0;
}