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.awt.geom.AffineTransform;
import java.awt.geom.Area;
import java.awt.geom.Path2D;
import java.awt.geom.PathIterator;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;

public class RectanglePuzzleRedo{
	public static void main(String[] args){
		FastScanner sc = new FastScanner();
		long w = sc.nextLong();
		long h = sc.nextLong();
		double a = sc.nextDouble();
		
		Area oriRect = makePoly(Arrays.asList(new double[][]{{w/2.0,h/2.0},{-w/2.0,h/2.0},{-w/2.0,-h/2.0},{w/2.0,-h/2.0}}));
		Area rotRect = oriRect.createTransformedArea(AffineTransform.getRotateInstance(Math.toRadians(a)));
		
		rotRect.intersect(oriRect);
		System.out.println(calcPolyArea(rotRect));
	}
	
	public static Area makePoly(List<double[]> points){
		Path2D.Double poly = new Path2D.Double();
		poly.moveTo(points.get(0)[0], points.get(0)[1]);
		for(int i=1;i<points.size();i++){
			poly.lineTo(points.get(i)[0], points.get(i)[1]);
		}
		poly.closePath();
		return new Area(poly);
	}
	
	public static double calcPolyArea(Area poly){
		PathIterator points = poly.getPathIterator(null);
		List<double[]> inPoints= new ArrayList<double[]>();
		while(!points.isDone()){
			double[] p = new double[2];
			switch(points.currentSegment(p)){
				case PathIterator.SEG_CLOSE:
					break;
				default:
					inPoints.add(p);
			}
			points.next();
		}
		
		double area = 0.0;
		for(int i=0;i<inPoints.size();i++){
			if(i==inPoints.size()-1){
				area += inPoints.get(i)[0]*inPoints.get(0)[1] - inPoints.get(0)[0]*inPoints.get(i)[1];
			}else{
				area += inPoints.get(i)[0]*inPoints.get(i+1)[1] - inPoints.get(i+1)[0]*inPoints.get(i)[1];
			}
		}
		area = Math.abs(area/2.0);
		return area;
	}
	
	public static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

		long nextLong() {
			return Long.parseLong(nextToken());
		}

		double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}
}