Problem: You are given two rectangles on a plane. The centers of both rectangles are located in the origin of coordinates (meaning the center of the rectangle's symmetry). The first rectangle's sides are parallel to the coordinate axes: the length of the side that is parallel to the Ox axis, equals w, the length of the side that is parallel to the Oy axis, equals h. The second rectangle can be obtained by rotating the first rectangle relative to the origin of coordinates by angle α.

<image>

Your task is to find the area of the region which belongs to both given rectangles. This region is shaded in the picture.

Input

The first line contains three integers w, h, α (1 ≤ w, h ≤ 106; 0 ≤ α ≤ 180). Angle α is given in degrees.

Output

In a single line print a real number — the area of the region which belongs to both given rectangles.

The answer will be considered correct if its relative or absolute error doesn't exceed 10 - 6.

Examples

Input

1 1 45


Output

0.828427125


Input

6 4 30


Output

19.668384925

Note

The second sample has been drawn on the picture above.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main implements Runnable {

    private void solve() throws IOException {

        long w = nextInt();
        long h = nextInt();
        double alpha = nextInt();
        if (alpha > 90) {
            alpha = 180 - alpha;
        }
        if (alpha == 0) {
            writer.println(w * h);
            return;
        }
        if (w < h) {
            long t = w;
            w = h;
            h = t;
        }
        alpha = alpha * Math.PI / 180;
        double beta = 2.0d * Math.atan2(h, w);
        if (alpha < beta) {
            double rightBottomX = w;
            double rightBottomY = -h;
            rightBottomX /= 2;
            rightBottomY /= 2;
            double rightTopX = rightBottomX;
            double rightTopY = -rightBottomY;

            double newBottomX = rightBottomX * Math.cos(alpha) - rightBottomY
                            * Math.sin(alpha);
            double newBottomY = rightBottomX * Math.sin(alpha) + rightBottomY
                            * Math.cos(alpha);

            double newTopX = rightTopX * Math.cos(alpha) - rightTopY
                            * Math.sin(alpha);
            double newTopY = rightTopX * Math.sin(alpha) + rightTopY
                            * Math.cos(alpha);

            Line oldLine = new Line(rightBottomX, rightBottomY, rightTopX,
                            rightTopY);
            Line newLine = new Line(newBottomX, newBottomY, newTopX, newTopY);

            Point p = oldLine.intersectOtherLine(newLine);
            double k11 = rightTopY - p.y;
            double k12 = k11 * Math.tan(alpha);
            double g1 = k11 / Math.cos(alpha);
            double k21 = h;
            k21 = k21 - k11 - g1;
            double k22 = k21 / Math.tan(alpha);

            double s = w * h;
            s = s - k11 * k12 - k21 * k22;
            if (s < 100000000) {
                writer.println(s);
            }
            else {
                writer.println((long) s);
            }
            return;
        }

        double rightTopX = w;
        double rightTopY = h;
        rightTopX /= 2;
        rightTopY /= 2;

        double leftTopX = -rightTopX;
        double leftTopY = rightTopY;

        double newLeftX = leftTopX * Math.cos(alpha) - leftTopY
                        * Math.sin(alpha);
        double newLeftY = leftTopX * Math.sin(alpha) + leftTopY
                        * Math.cos(alpha);

        double newRightX = rightTopX * Math.cos(alpha) - rightTopY
                        * Math.sin(alpha);
        double newRightY = rightTopX * Math.sin(alpha) + rightTopY
                        * Math.cos(alpha);

        Line newLine = new Line(newLeftX, newLeftY, newRightX, newRightY);
        Line oldLine = new Line(rightTopX, rightTopY, leftTopX, leftTopY);
        Point p = oldLine.intersectOtherLine(newLine);

        double k1 = p.x - leftTopX;
        double k2 = h;
        k2 = k2 / Math.tan(alpha);
        k2 = k1 - k2;
        double s = w * h;
        s = s - (k1 + k2) * h;
        if (s < 100000000) {
            writer.println(s);
        }
        else {
            writer.println((long) s);
        }
    }

    static class Line {

        final double A;
        final double B;
        final double C;

        Line(double A, double B, double C) {
            this.A = A;
            this.B = B;
            this.C = C;
        }

        Line(double x1, double y1, double x2, double y2) {
            A = y1 - y2;
            B = x2 - x1;
            C = x1 * y2 - x2 * y1;
        }

        public Point intersectOtherLine(Line otherLine) {
            double d = A * otherLine.B - B * otherLine.A;
            if (d == 0) {
                return null;
            }
            return new Point((B * otherLine.C - C * otherLine.B) / d, (C
                            * otherLine.A - A * otherLine.C)
                            / d);
        }

    }

    static class Point {

        final double x;
        final double y;

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

        double distTo(Point p) {
            return Math.sqrt((p.x - x) * (p.x - x) + (p.y - y) * (p.y - y));
        }
    }

    public static void main(String[] args) {
        new Main().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    @Override
    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        }
        catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}