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.*;
import java.io.*;
public class RectanglePuzzle
{
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		
		int w = in.nextInt();
		int h = in.nextInt();
		int a = in.nextInt();
		double alpha = a * Math.PI / 180.0;
		
		if(a == 0 || a == 180 || (a == 90 && w == h))
		{
			System.out.println((long)w * h);
		}
		else
		{
			Point[] normal = new Point[4];
			normal[0] = new Point((double)w / 2, (double)h / 2);
			normal[1] = new Point(-(double)w / 2, (double)h / 2);
			normal[2] = new Point(-(double)w / 2, -(double)h / 2);
			normal[3] = new Point((double)w / 2, -(double)h / 2);
			
			Point[] shifted = new Point[4];
			for(int x = 0; x < normal.length; x++)
			{
				shifted[x] = rotate(normal[x], alpha);
			}
			
			Vector[] rec1 = new Vector[4];
			Vector[] rec2 = new Vector[4];
			for(int y = 0; y < rec1.length; y++)
			{
				rec1[y] = new Vector(normal[y], normal[(y + 1) % 4]);
				rec2[y] = new Vector(shifted[y], shifted[(y + 1) % 4]);
			}
			
			ArrayList<Point> points = new ArrayList<Point>();
			Point bmlm = new Point(Double.MAX_VALUE, Double.MAX_VALUE);
			for(int z = 0; z < rec1.length; z++)
			{
				for(int b = 0; b < rec2.length; b++)
				{
					Point current = intersect(rec1[z], rec2[b]);
					
					if(current != null)
					{
						points.add(current);
						
						if(current.y < bmlm.y - 1E-9 || (current.y > bmlm.y - 1E-9 && current.y < bmlm.y + 1E-9 && current.x < bmlm.x))
						{
							bmlm = current;
						}
					}
				}
			}
			
			Collections.sort(points, new ComparePoint(bmlm));
			
			System.out.println(area(points));
		}
	}
	
	public static Point rotate(Point p, double angle)
	{
		double r = Math.sqrt(p.x * p.x + p.y * p.y);
		double unshifted = Math.atan2(p.y, p.x);
		return new Point(r * Math.cos(unshifted + angle), r * Math.sin(unshifted + angle));
	}
	
	public static Point intersect(Vector a, Vector b)
	{
		double det1 = determinant(a.x, a.y, a.x + a.dx, a.y + a.dy);
		double det2 = determinant(b.x, b.y, b.x + b.dx, b.y + b.dy);
		double disc = determinant(a.dx, a.dy, b.dx, b.dy);
		
		if(disc > -1E-9 && disc < 1E-9)
		{
			return null;
		}
		else
		{
			double ix = -(det1 * b.dx - det2 * a.dx) / disc;
			double iy = -(det1 * b.dy - det2 * a.dy) / disc;
			
			double maxX = Math.min(Math.max(a.x, a.x + a.dx), Math.max(b.x, b.x + b.dx));
			double minX = Math.max(Math.min(a.x, a.x + a.dx), Math.min(b.x, b.x + b.dx));
			double maxY = Math.min(Math.max(a.y, a.y + a.dy), Math.max(b.y, b.y + b.dy));
			double minY = Math.max(Math.min(a.y, a.y + a.dy), Math.min(b.y, b.y + b.dy));
			if(ix > maxX + 1E-9 || ix < minX - 1E-9 || iy > maxY + 1E-9 || iy < minY - 1E-9)
			{
				return null;
			}
			else
			{
				return new Point(ix, iy);
			}
		}
	}
	
	public static double determinant(double a, double b, double c, double d)
	{
		return (a * d) - (c * b);
	}
	
	public static double area(ArrayList<Point> polygon)
	{
		double result = 0;
		for(int i = 1; i < polygon.size() - 1; i++)
		{
			result += Math.abs(determinant(polygon.get(i).x - polygon.get(0).x, polygon.get(i).y - polygon.get(0).y, polygon.get(i + 1).x - polygon.get(0).x, polygon.get(i + 1).y - polygon.get(0).y) / 2.0);
		}
		
		return result;
	}
}

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

class Vector
{
	double x;
	double y;
	double dx;
	double dy;
	
	public Vector(double x1, double y1, double x2, double y2)
	{
		x = x1;
		y = y1;
		dx = x2 - x1;
		dy = y2 - y1;
	}
	
	public Vector(Point p1, Point p2)
	{
		x = p1.x;
		y = p1.y;
		dx = p2.x - p1.x;
		dy = p2.y - p1.y;
	}
}

class ComparePoint implements Comparator<Point>
{
	Point first;
	
	public ComparePoint(Point f)
	{
		first = f;
	}
	
	public int compare(Point a, Point b)
	{
		if(a == first)
		{
			return -1;
		}
		else if(b == first)
		{
			return 1;
		}
		else
		{
			double angle1 = Math.atan2(a.y - first.y, a.x - first.x);
			double angle2 = Math.atan2(b.y - first.y, b.x - first.x);
			
			if(angle1 < angle2)
			{
				return -1;
			}
			else
			{
				return 1;
			}
			
//			double cross = RectanglePuzzle.determinant(a.x, a.y, b.x, b.y);
//			
//			if(cross < 0)
//			{
//				return -1;
//			}
//			else if(cross > 0)
//			{
//				return 1;
//			}
//			else
//			{
//				return 0;
//			}
		}
	}
}