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 JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.math.*;

public class BlitzP {

    public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		double n = in.nextInt();
		double r = in.nextInt();
		
		//Want to find area of top triangle (count the bottom of the triangle to be a horizontal line from where the otherlines intersect its sides).
		//        *(0,r)
		//       ***
		//      *****
		//    a*******b
		//******************
		// ****************
		//
		//This requires finding points a and b.
		// a is the intersection of 
		// - the line between the 0th pt and the (n-1)/2 point going counterclockwise around the circle
		// - the line between the 1st pt and the (n+3)/2 point goint counterclockwise around the circle.
		
		//The ith pt has coordinates (r * cos(theta) , r * sin(theta)) where theta is (2*pi*i/n) + pi/2
		
		double x0 = 0;
		double y0 = r;
		
		double x1 = r * Math.cos((2*Math.PI/n)+(Math.PI/2));
		double y1 = r * Math.sin((2*Math.PI/n)+(Math.PI/2));
		
		//(n-1)/2
		double xn1 = r * Math.cos((Math.PI*(n-1)/n)+(Math.PI/2));
		double yn1 = r * Math.sin((Math.PI*(n-1)/n)+(Math.PI/2));
		
		//(n+3)/2
		double xn3 = r * Math.cos((Math.PI*(n+3)/n)+(Math.PI/2));
		double yn3 = r * Math.sin((Math.PI*(n+3)/n)+(Math.PI/2));
		
		//line from 0 to (n-1)/2
		double m1 = (yn1-y0)/(xn1-x0);//slope
		double b1 = y0-(m1*x0);//y intercept
		
		//line from 1 to (n+3)/2
		double m2 = (yn3-y1)/(xn3-x1);//slope
		double b2 = y1-(m2*x1);//y intercept
		
		//y = m1x+b1 and y = m2x+b2 so m1x+b1=m2x+b2
		// so m1x-m2x = b2-b1
		// x = (b2-b1)/(m1-m2)
		
		double ax = (b2-b1)/(m1-m2);
		double bx = -1*ax;
		
		//simply plug back into either equation
		double aby = (m1*ax)+b1;
		
		//And calculating the area of the triangle
		double base = bx - ax;
		double height = r - aby;
		double triangleArea = .5 * base * height;
		//There are n such triangles
		double triangleAreas = n*triangleArea;
		//There is also a polygon with n sides at the center
		//Area of regular polygon given side length A = (s^2 * n)/(4 * tan(pi/n))
		double sideLength = bx - ax;
		double polygonArea = sideLength*sideLength*n/(4*Math.tan(Math.PI/n));
		//Add the areas
		double totalArea = polygonArea + triangleAreas;
		System.out.println(totalArea);
	}
}