Problem: It was decided in IT City to distinguish successes of local IT companies by awards in the form of stars covered with gold from one side. To order the stars it is necessary to estimate order cost that depends on the area of gold-plating. Write a program that can calculate the area of a star.

A "star" figure having n ≥ 5 corners where n is a prime number is constructed the following way. On the circle of radius r n points are selected so that the distances between the adjacent ones are equal. Then every point is connected by a segment with two maximally distant points. All areas bounded by the segments parts are the figure parts.

<image>

Input

The only line of the input contains two integers n (5 ≤ n < 109, n is prime) and r (1 ≤ r ≤ 109) — the number of the star corners and the radius of the circumcircle correspondingly.

Output

Output one number — the star area. The relative error of your answer should not be greater than 10 - 7.

Examples

Input

7 10


Output

108.395919545675

Solution (in PYTHON):

Solution:
#!/usr/bin/env python
#-*- coding:utf-8 -*-

import sys, math, random, operator
from string import ascii_lowercase
from string import ascii_uppercase
from fractions import Fraction, gcd
from decimal import Decimal, getcontext
from itertools import product, permutations, combinations
from Queue import Queue, PriorityQueue
from collections import deque, defaultdict, Counter
getcontext().prec = 100

MOD = 10**9 + 7
INF = float("+inf")

if sys.subversion[0] != "CPython":  # PyPy?
    raw_input = lambda: sys.stdin.readline().rstrip()
pr = lambda *args: sys.stdout.write(" ".join(str(x) for x in args) + "\n")
epr = lambda *args: sys.stderr.write(" ".join(str(x) for x in args) + "\n")
die = lambda *args: pr(*args) ^ exit(0)

read_str = raw_input
read_strs = lambda: raw_input().split()
read_int = lambda: int(raw_input())
read_ints = lambda: map(int, raw_input().split())
read_float = lambda: float(raw_input())
read_floats = lambda: map(float, raw_input().split())

def line(p1, p2):
    A = (p1[1] - p2[1])
    B = (p2[0] - p1[0])
    C = (p1[0]*p2[1] - p2[0]*p1[1])
    return A, B, -C

def intersection(L1, L2):
    D  = L1[0] * L2[1] - L1[1] * L2[0]
    Dx = L1[2] * L2[1] - L1[1] * L2[2]
    Dy = L1[0] * L2[2] - L1[2] * L2[0]
    # epr("L1", L1)
    # epr("L2", L2)
    # epr("Dx", Dx)
    # epr("Dy", Dy)
    if D != 0:
        x = Dx / D
        y = Dy / D
        return x,y
    else:
        return False

"---------------------------------------------------------------"

def sin(x):
    return Decimal(math.sin(x))
def cos(x):
    return Decimal(math.cos(x))
def oncircle(cnt):
    return cos(cnt * angle) * r, sin(cnt * angle) * r

pi = Decimal(math.pi)

n, r = read_ints()
nhalf = int(n) / 2
n = Decimal(str(n))
r = Decimal(str(r))

angle = 2*pi / n
epr("ANGLE", angle * 180 / pi)

top = oncircle(0)
bot = oncircle(nhalf + 1)
line1 = line(top, bot)
epr("top", top)
epr("bot", bot)
A = top

top = oncircle(-1)
bot = oncircle(nhalf - 1)
line2 = line(top, bot)
epr("top", top)
epr("bot", bot)
B = top

C = intersection(line1, line2)
epr("A", A)
epr("B", B)
epr("C", C)
area_segment = r**2 / 2 * (angle - sin(angle))

tri_a = ((B[0] - A[0])**2 + (B[1] - A[1])**2).sqrt()
tri_b = ((C[0] - A[0])**2 + (C[1] - A[1])**2).sqrt()
tri_h = (tri_b**2  - tri_a**2/4).sqrt()
area_triangle = Decimal(0.5) * tri_a * tri_h
# epr(tri_a, tri_b, tri_h, area_triangle)

full_area = pi * r**2
ans = full_area - (area_triangle + area_segment) * n
epr(full_area)
epr(area_triangle)
epr(area_segment)
epr(n * (area_triangle + area_segment))
epr("answer")
print ans