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.Scanner;

public class RectanglePuzzle 
{
	static double w;
	static double h;
	static double alpha;
	static double[] rotpointsx = new double[3];
	static double[] rotpointsy = new double[3];
	static double[] oripointsx = new double[3];
	static double[] oripointsy = new double[3];
	
	static double[] clashpointsx = new double[4];
	static double[] clashpointsy = new double[4];
	
	public static void main(String[] args) 
	{
		Scanner sc = new Scanner(System.in);
		boolean debug = false;
		
		w = sc.nextLong();
		h = sc.nextLong();
		alpha = sc.nextLong();
		
		if(h > w)
		{
			double temp = w;
			w = h;
			h = temp;
		}
		
		if(alpha%180 == 0)
		{
			System.out.println(w*h);
			return;
		}
		
		if(alpha > 180)alpha = 360 - alpha;
		if(alpha > 90)alpha = 180 - alpha;
		
		alpha = Math.toRadians(alpha);
		if(debug)System.out.println(alpha);
		
		oripointsx[0] = -w/2;
		oripointsy[0] = h/2;
		oripointsx[1] = -w/2;
		oripointsy[1] = -h/2;
		oripointsx[2] = w/2;
		oripointsy[2] = h/2;
		
//		oripointsx[0] = 5;
//		oripointsy[0] = 0;
		
		if(debug)System.out.println("X " + oripointsx[0]);
	
		for(int i = 0; i < 3; i++)
		{
			if(debug)System.out.println("ori: " + oripointsx[i] + " " + oripointsy[i] + ", sin " + Math.sin(alpha));
//			rotpointsx[i] = oripointsx[i] * Math.cos(alpha) + oripointsy[i] * Math.sin(alpha);
//			rotpointsy[i] = (oripointsy[i] * Math.cos(alpha)) - (oripointsx[i] * Math.sin(alpha));
			rotpointsx[i] = (oripointsx[i] * Math.cos(alpha)) - (oripointsy[i] * Math.sin(alpha));
			rotpointsy[i] = (oripointsy[i] * Math.cos(alpha)) + (oripointsx[i] * Math.sin(alpha));
			if(debug)System.out.println(rotpointsx[i] + " " + rotpointsy[i]);
		}
		
		if(debug)System.out.println("DEBUG " + rotpointsx[1] + " " + rotpointsx[0]);
		//assume case 0 for now
		
		double grad = (rotpointsy[1] - rotpointsy[0])/(rotpointsx[1] - rotpointsx[0]);
		//
		clashpointsy[0] = h/2;
		clashpointsx[0] = (rotpointsx[2] - rotpointsx[0])/(rotpointsy[2] - rotpointsy[0]) * (clashpointsy[0] - rotpointsy[0]) + rotpointsx[0];
		
		clashpointsx[1] = -w/2;
		clashpointsy[1] = (rotpointsy[2] - rotpointsy[0])/(rotpointsx[2] - rotpointsx[0]) * (clashpointsx[1] - rotpointsx[0]) + rotpointsy[0];
		
		boolean crossed = false;
		double triw, trih, triz;
		double tot = w * h;
		if(debug)System.out.println("STARTTOT " + tot);
		
		if(clashpointsy[1] < -h/2)
		{
			if(debug)System.out.println("CROSSED!");
			crossed = true;
			clashpointsy[1] = -h/2;
			clashpointsx[1] = (rotpointsx[2] - rotpointsx[0])/(rotpointsy[2] - rotpointsy[0]) * (clashpointsy[1] - rotpointsy[0]) + rotpointsx[0];
			if(debug)
			{
				System.out.println("DeltaX/DeltaY " + ((rotpointsx[2] - rotpointsx[0])/(rotpointsy[2] - rotpointsy[0])));
				System.out.println("NewClash0 " + clashpointsx[0] + " " + clashpointsy[0]);
				System.out.println("NewClash1 " + clashpointsx[1] + " " + clashpointsy[1]);
			}
			
			triw = clashpointsx[0] - clashpointsx[1];
			trih = h;
			
			triz = triw * trih / 2;
			
			double sqw = clashpointsx[1] - (-w/2);
			double sqh = h;
			
			double sqz = sqw * sqh;
			if(debug)System.out.println("SQ " + sqw + " " + sqh);
			if(debug)System.out.println("SQZ " + sqz);
			tot -= sqz*2;
			
			//jajar genjang
			double jgw = w;
			jgw -= (clashpointsx[1] - (-w/2));
			jgw -= (clashpointsx[0] - (-w/2));
			if(debug)System.out.println("J. G. " + (jgw * h));
			System.out.println((jgw*h));
			return;
			
		}
		else if(clashpointsy[0] < -w/2)
		{ //Vertical Boi
			
			clashpointsx[0] = w/2;
			clashpointsy[0] = (rotpointsy[2] - rotpointsy[0])/(rotpointsx[2] - rotpointsx[0]) * (clashpointsx[0] - rotpointsx[0]) + rotpointsy[0];
			
			System.out.println("Verti Clash " + clashpointsx[0] + " " + clashpointsy[0]);
			System.out.println("Verti Clash1 " + clashpointsx[1] + " " + clashpointsy[1]);
			
			triw = 0;
			trih = 0;
			triz = 0;
			return;
		}
		else
		{
			if(debug)
			{
				System.out.println("DEBUG " + (rotpointsx[1] - rotpointsx[0]));
				System.out.println("DEBUG2 " + ((rotpointsx[2] - rotpointsx[0])/(rotpointsy[2] - rotpointsy[0])));
				System.out.println("DEBUG3 " + (clashpointsy[0] - rotpointsy[0]) + " FROM " + (clashpointsy[0]) + " - " + rotpointsy[0]);
				System.out.println("Clash " + clashpointsx[0] + " " + clashpointsy[0] + " | " + clashpointsx[1] + " " + clashpointsy[1]);
			}
			triw = clashpointsx[0] - (-w/2);
			trih = (h/2) - clashpointsy[1];
			
			triz = triw * trih / 2;
			
		}
		
		if(debug)
		{
			System.out.println("TRI " + triw + " " + trih);
			System.out.println("TRIZ " + triz);
		}
		
		tot -= triz*2;
		
		if(!crossed)
		{
			if(debug)System.out.println("NEXT");
			clashpointsx[2] = -w/2;
			clashpointsy[2] = ((rotpointsy[1] - rotpointsy[0])/(rotpointsx[1] - rotpointsx[0]) * (clashpointsx[2] - rotpointsx[0])) + rotpointsy[0];
			
			clashpointsy[3] = -h/2;
			clashpointsx[3] = (rotpointsx[1] - rotpointsx[0])/(rotpointsy[1] - rotpointsy[0]) * (clashpointsy[3] - rotpointsy[0]) + rotpointsx[0];
			
			if(debug)
			{
				System.out.println("Clash " + clashpointsx[2] + " " + clashpointsy[2] + " | " + clashpointsx[3] + " " + clashpointsy[3]);
				System.out.println("DEBUG0 " + (rotpointsy[1] - rotpointsy[0]) + " / " + (rotpointsx[1] - rotpointsx[0]));
				System.out.println("DEBUG1 " + (rotpointsx[1] - rotpointsx[0])/(rotpointsy[1] - rotpointsy[0]) );
		//		System.out.println("ROTX " + rotpointsx[0] + " " + rotpointsx[1]);
			}
			
			triw = clashpointsx[3] - (-w/2);
			trih = clashpointsy[2] - (-h/2);
			
			triz = triw * trih / 2;
			if(debug)
			{
				System.out.println("TRI " + triw + " " + trih);
				System.out.println("TRIZ " + triz);
			}
		}
		
		tot -= triz*2;		
		System.out.println(tot);
	}

}