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.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

public class Rectangle {

static final double EPS = 1e-7;
	
	static double deg2rad(double deg){
		return deg * Math.PI / 180.0;
	}
	
	static double rad2deg(double rad){
		return rad * 180.0 / Math.PI;
	}

	static class Point implements Comparable<Point>{
		double x, y;

		public boolean eq(Point p) {
	        return Math.abs(x - p.x) < EPS && Math.abs(y - p.y) < EPS;
	    }
		
		public Point(double x, double y) {
			this.x = x;
			this.y = y;
		}

		public Point rotate(double alph) {
			return new Point(x * Math.cos(alph) - y * Math.sin(alph), x
					* Math.sin(alph) + y * Math.cos(alph));
		}
		
		public double dist(Point b){
			double dx = b.x - this.x;
			double dy = b.y - this.y;
			return Math.sqrt(dx*dx + dy*dy);
		}

		@Override
		public int compareTo(Point o) {
			if (cmp(y, o.y) != 0)
				return cmp(y, o.y);
			return cmp(x, o.x);
		}
		
		public Point sub(Point a){
			return new Point(x - a.x,y - a.y);
		}
		
		public Point add(Point a){
			return new Point(x + a.x,y + a.y);
		}
		
		public double cross(Point a){
			return x*a.y - y*a.x;
		}
		
		public Point multbyscalar(double ua) {
			return  new Point(ua*x,ua*y);
		}

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

	static class Line {
		double A, B, C;
		boolean normed = false;

		public Line(Point P, Point Q) {
			A = Q.y - P.y;
			B = P.x - Q.x;
			C = -A * P.x - B * P.y;
		}

		Point intersect(Line p) {
			double D = A * p.B - B * p.A;
			if (eqZero(D))
				return null;
			double x = C * p.B - B * p.C;
			double y = A * p.C - C * p.A;
			return new Point(-x / D, -y / D);
		}
		
		void norm() {
			double z = Math.sqrt(A * A + B * B);
			A /= z;
			B /= z;
			C /= z;
			normed = true;
		}

		double dist(Point p) {
			if (!normed)
				norm();
			return Math.abs(A * p.x + B * p.y + C);
		}

	}

	static boolean eqZero(double d) {
		return Math.abs(d) < EPS;
	}
	
	public static double areaPoly(Point[] pol) {
		int n = pol.length;
		double s = 0;
		for(int i = 0;i < n - 1;i++){
			s += (pol[i].x*pol[i+1].y-pol[i+1].x*pol[i].y) / 2;
		}
		s += (pol[n-1].x*pol[0].y-pol[0].x*pol[n-1].y) / 2;
		return Math.abs(s);
	}
	
	public static ArrayList<Point> convexHull(ArrayList<Point> p) {
        int n = p.size();
        if (n <= 1)
            return p;
        Collections.sort(p, new Comparator<Point>() {
            @Override
            public int compare(Point o1, Point o2) {
                int sx = (int) Math.signum(o1.x - o2.x);
                return sx != 0 ? sx : (int) Math.signum(o1.y - o2.y);
            }
        });
        Point[] q = new Point[n * 2];
        int cnt = 0;
        for (int i = 0; i < n; q[cnt++] = p.get(i++))
            for (; cnt > 1 && !cw(q[cnt - 2], q[cnt - 1], p.get(i)); --cnt)
                ;
        for (int i = n - 2, t = cnt; i >= 0; q[cnt++] = p.get(i--))
            for (; cnt > t && !cw(q[cnt - 2], q[cnt - 1], p.get(i)); --cnt)
                ;
        ArrayList<Point> res = new ArrayList<Point>();
        int len = cnt - 1 - (q[0].eq(q[1]) ? 1 : 0);
        for (int i = 0; i < len; ++i)
            res.add(q[i]);
        return res;
    }
	
	static boolean cw(Point a, Point b, Point c) {
        return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x) < -EPS;
    }

	// Intersection of 2 segments
	static Point intersect(Point a, Point b, Point c, Point d) {				
		Line A = new Line(a, b);
		Line B = new Line(c, d);
		Point res = A.intersect(B);				
		if (res == null) return null;
		if (isInside(res.x, a.x, b.x) && isInside(res.y, a.y, b.y))	return res;		
		return null;
	}
	
	static boolean isInside(double val, double x, double y) {
		if (x > y) {
			double tmp = x;
			x = y;
			y = tmp;
		}
		return cmp(val, x) >= 0 && cmp(val, y) <= 0;
	}
	
	static int cmp(double a, double b) {
		if (eqZero(a - b))
			return 0;
		return Double.compare(a, b);
	}
	
	// Clips the polygon with the line given
	static Point[] sutherland_hodgman(Point[]  line,Point[] poly,int flag){
		ArrayList<Point> output=new ArrayList<Point>();
		Point S=poly[poly.length-1];
		for(int i=0;i<poly.length;i++){
			Point E=poly[i];
			double ecross=line[1].sub(line[0]).cross(E.sub(line[0]));
			double scross=line[1].sub(line[0]).cross(S.sub(line[0]));
			if (Math.abs(ecross)<EPS)
				output.add(E);
			else if (ecross*flag>EPS){
				if (scross*flag<-EPS)
					output.add(intersect(line[0],line[1],S,E));
				output.add(E);
			}
			else if(scross*flag>EPS)
				output.add(intersect(line[0],line[1],S,E));
			S=E;
		}
		Point[] ret=new Point[output.size()];
		return output.toArray(ret);
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double w = sc.nextInt();
		double h = sc.nextInt();

		if (w < h) {
			double t = w;
			w = h;
			h = t;
		}
		int alphaInt = sc.nextInt();
		double res;
		if (alphaInt == 0 || alphaInt == 180) {
			res = h * w;
		} else if (alphaInt == 90) {
			res = h * h;
		} else {
			if (alphaInt > 90) alphaInt = 180 - alphaInt;
			
			Point[] ini = new Point[4];
			ini[0] = new Point(-w/2,h/2);
			ini[1] = new Point(w/2,h/2);
			ini[2] = new Point(w/2,-h/2);
			ini[3] = new Point(-w/2,-h/2);
			
			Point[] rot = new Point[4];
			for(int i = 0; i<4; i++)
				rot[i] = ini[i].rotate(deg2rad(alphaInt));
			
			Point[] newP = ini;
			for(int i =0; i<4; i++){
				Point[] line = new Point[]{rot[i%4], rot[(i+1)%4]};
				newP = sutherland_hodgman(line, newP, -1);
			}
			
			res = areaPoly(newP);
		}
		System.out.printf("%.10f\n", res);
	}

}