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<(n);i++)
typedef long long ll;
typedef long double ld;
const ld PI = acos(-1);

typedef complex<ld> P;

struct L {
    P a, b, v;
    L(){}
    L(P _a, P _b) : a(_a), b(_b), v(b - a) {}
};

P rot(P p, ld theta) {
    ld x = p.real(), y = p.imag();
    return P(x * cos(theta) - y * sin(theta), x * sin(theta) + y * cos(theta));
}

ld cross(P a, P b) {
    return imag(conj(a) * b);
}

P crosspointSS(L l1, L l2) {
    ld d1 = abs(cross(l2.v, l1.a - l2.a)); // <----????
    // ld d1 = abs(cross(l2.v, l1.a - l2.b)); // <----????
    // ld d1 = abs(cross(l2.v, l1.b - l2.a)); // <----????
    ld d2 = abs(cross(l2.v, l1.b - l2.a));
    ld t = d1 / (d1 + d2);
    return l1.a + t * l1.v;
}

ld distanceLP(L l, P p) {
    return abs(cross(l.v, p - l.a)) / abs(l.v);
}

ld area(P p0, P p1, P p2) {
    p1 -= p0, p2 -= p0;
    return abs(cross(p1, p2)) / 2;
}

signed main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    ld N, K;
    cin >> N >> K;

    ld theta = 2 * PI / N;
    P p0(1, 0);
    P p1 = rot(p0, K * theta);
    P q0 = rot(p0, theta);
    P q1 = rot(q0, - K * theta);

    L l(p0, p1);
    L m(q0, q1);
    P C = crosspointSS(l, m);

    const P O(0, 0);
    ld ans = N * (area(O, p0, q0) - area(C, p0, q0));
    cout << setprecision(10) << ans << endl;
}