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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.io.BufferedInputStream;
import java.util.concurrent.Callable;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		BufferedInputStream in = new BufferedInputStream(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskP solver = new TaskP();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskP {
		public void solve(int testNumber, BufferedInputStream _in, PrintWriter out) {
			InputReader in = new InputReader(_in);
			long startTime = System.currentTimeMillis();
			int nt = 1;
			Task t = new Task(1);
			t.readInput(in);
			t.call();
			t.writeOutput(out);
			in.close();
			System.err.println("Time: " + (System.currentTimeMillis() - startTime) + " miliseconds");
		}

	}

	static class LineD {
		PointD a;
		PointD ab;

		LineD(PointD a, PointD b, boolean twoPoints) {
			this.a = new PointD(a);
			if (twoPoints) {
				this.ab = Point._opSub(b, a);
			} else {
				this.ab = new PointD(b);
			}
		}

		LineD(double xa, double ya, double xb, double yb) {
			this.a = new PointD(xa, ya);

			this.ab = new PointD((xb - xa), (yb - ya));
		}

		LineD(Line l) {
			this.a = new PointD(l.a);
			this.ab = new PointD(l.ab);
		}

		PointD b() {
			return Point._opPlus(a, ab);
		}


		public String toString() {
			return "LineD{" +
					a +
					" " + b() +
					'}';
		}


		public int hashCode() {
			return a.hashCode() ^ ab.hashCode();
		}

	}

	static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public static boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public void close() {

		}

	}

	static class PointD implements Comparable<PointD> {
		public double x;
		public double y;

		public PointD(double x, double y) {
			this.x = x;
			this.y = y;
		}

		public PointD(long x, long y) {
			this.x = x;
			this.y = y;
		}

		public PointD(PointD o) {
			this.x = o.x;
			this.y = o.y;
		}

		public PointD(Point o) {
			this.x = o.x;
			this.y = o.y;
		}


		public int compareTo(PointD o) {
			int t = Double.compare(y, o.y);
			if (t != 0)
				return t;
			return Double.compare(x, o.x);
		}

		public double abs() {
			return (x * x) + (y * y);
		}

		public double norm() {
			return Math.sqrt(abs());
		}

		public double opPow(PointD b) {
			return Point._opPow(this, b);
		}

		public PointD opSub(PointD b) {
			return Point._opSub(this, b);
		}


		public String toString() {
			return String.format("%.20f", x) + " " + String.format("%.20f", y);
		}


		public int hashCode() {
			return Double.hashCode(x) ^ Double.hashCode(y);
		}

		public boolean equals(Object obj) {
			if (obj instanceof PointD) {
				return compareTo((PointD) obj) == 0;
			}
			return false;
		}

		public boolean isZeroPoint() {
			return x == 0 && y == 0;
		}

	}

	static class Point implements Comparable<Point> {
		public long x;
		public long y;

		public Point(Point o) {
			this.x = o.x;
			this.y = o.y;

		}

		public Point(long x, long y) {
			super();

			this.x = x;
			this.y = y;
		}


		public int compareTo(Point o2) {
			int t = Long.compare(y, o2.y);
			if (t != 0) return t;
			return Long.compare(x, o2.x);
		}

		public static double _opPow(PointD lhs, PointD rhs) {
			return ((lhs.x * rhs.y) - (lhs.y * rhs.x));
		}

		public static Point _opSub(Point lhs, Point rhs) {
			return new Point((lhs.x - rhs.x), (lhs.y - rhs.y));
		}

		public static PointD _opSub(PointD lhs, PointD rhs) {
			return new PointD((lhs.x - rhs.x), (lhs.y - rhs.y));
		}

		public static Point _opPlus(Point lhs, Point rhs) {
			return new Point((lhs.x + rhs.x), (lhs.y + rhs.y));
		}

		public static PointD _opPlus(PointD lhs, PointD rhs) {
			return new PointD((lhs.x + rhs.x), (lhs.y + rhs.y));
		}


		public String toString() {
			return x + " " + y;
		}


		public int hashCode() {
			return Long.hashCode(x) ^ Long.hashCode(y);
		}

		public boolean equals(Object obj) {
			if (obj instanceof Point) {
				return compareTo((Point) obj) == 0;
			}
			return false;
		}

	}

	static class Line {
		Point a;
		Point ab;

		Line(Point a, Point b, boolean twoPoints) {
			this.a = new Point(a);
			if (twoPoints) {
				this.ab = Point._opSub(b, a);
			} else {
				this.ab = new Point(b);
			}
		}

		Line(long xa, long ya, long xb, long yb) {
			this.a = new Point(xa, ya);

			this.ab = new Point((xb - xa), (yb - ya));
		}

		Point b() {
			return Point._opPlus(a, ab);
		}


		public String toString() {
			return "Line{" +
					"(" + a +
					") (" + b() +
					")}";
		}

		private static boolean endpointCheck(EndPointChecker checker, double a, double b) {
			switch (checker) {
				case NO_ENDPOINT:
					return true;
				case CLOSED_ENDPOINT:
					return a <= b;
				case OPEN_ENDPOINT:
					return a < b;
				default:
					throw new RuntimeException();
			}
		}

		public static boolean intersectLines(EndPointChecker LA,
											 EndPointChecker LB,
											 EndPointChecker RA,
											 EndPointChecker RB,
											 LineD lhs,
											 LineD rhs,
											 PointD ret) {
			if (lhs.ab.isZeroPoint() || rhs.ab.isZeroPoint()) {
				System.err.println(lhs);
				System.err.println(rhs);
				throw new RuntimeException();
			}

			double s = lhs.ab.opPow(rhs.ab);
			if (s == 0) return false;
			//        auto ls = (rhs.a - lhs.a) ^ rhs.ab;
			//        auto rs = (rhs.a - lhs.a) ^ lhs.ab;
			//        if (s < 0) s = -s, ls = -ls, rs = -rs;
			double ls = rhs.a.opSub(lhs.a).opPow(rhs.ab);
			double rs = rhs.a.opSub(lhs.a).opPow(lhs.ab);
			if (s < 0) {
				s = (-s);
				ls = (-ls);
				rs = (-rs);
			}

			boolean intersect = endpointCheck(LA, 0l, ls) && endpointCheck(LB, ls, s) &&
					endpointCheck(RA, 0l, rs) && endpointCheck(RB, rs, s);

			if (intersect) {
				ret.x = lhs.a.x;
				ret.y = lhs.a.y;
				double temp = (double) ls / s;
				ret.x += temp * lhs.ab.x;
				ret.y += temp * lhs.ab.y;
			}
			return intersect;
		}

	}

	static class Task implements Callable<Task> {
		int n;
		int r;
		public static final double P2 = Math.PI * 2;
		double RE = 0;
		int testNumber;

		PointD getPoint(int i) {
			double a = i * (P2 / n);
			return new PointD(r * Math.cos(a), r * Math.sin(a));
		}

		PointD getX() {
			PointD p0 = getPoint(0);
			PointD p1 = getPoint(1);
			PointD pp0 = getPoint(n / 2);
			PointD pp1 = getPoint(n / 2 + 2);

			LineD l1 = new LineD(p0, pp0, true);
			LineD l2 = new LineD(p1, pp1, true);
			PointD ret = new PointD(0, 0);
			Line.intersectLines(EndPointChecker.NO_ENDPOINT, EndPointChecker.NO_ENDPOINT, EndPointChecker.NO_ENDPOINT, EndPointChecker.NO_ENDPOINT, l1, l2, ret);
			return ret;
		}

		public void readInput(InputReader in) {
	/* read input here */
			n = in.nextInt();
			r = in.nextInt();

		}

		public Task call() {
	/* process main algorithm here */
			PointD x = getX();
			double s = r * 2.0 * Math.sin(Math.PI / n);
			double a = r * Math.cos(Math.PI / n);
			double a1 = x.norm();

			double ar = a1 * s / 2.0;
			RE = n * ar;
			System.err.println("Test case: " + testNumber + " done!");
			return this;
		}

		public void writeOutput(PrintWriter out) {
			out.println(String.format("%.30f", RE)/* write output here */);
		}

		Task(int testNumber) {
			this.testNumber = testNumber;
		}

	}

	static enum EndPointChecker {
		NO_ENDPOINT,
		CLOSED_ENDPOINT,
		OPEN_ENDPOINT,;
	}
}