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.*;
import java.math.*;
 
public class Main
{
    static class Point{
        double x, y;
        public Point(double x, double y){
            this.x = x;
            this.y = y;
        }
    }

    static Point lineSegIntersection(Point p1, Point p2, Point p3, Point p4){
        //p1 #--------------# p2, p3 #--------------#p4
        double x1 = p1.x, x2 = p2.x, y1 = p1.y, y2 = p2.y, EPS = Math.pow(10, -6);
        double A1 = y2 - y1, B1 = x1 - x2, C1 = A1*x1 + B1*y1;

        double x3 = p3.x, x4 = p4.x, y3 = p3.y, y4 = p4.y;
        double A2 = y4 - y3, B2 = x3 - x4, C2 = A2*x3 + B2*y3;

        double x0 = 0.0d, y0 = 0.0d; // pt of intersection
        /*
            A1x + B1y = C1
            A2x + B2y = C2
        */

        double det = A1 * B2 - A2 * B1;
        if(det == 0){
            // parallel lines
            return null;
        }else{
            x0 = (B2 * C1 - B1 * C2) / det;
            y0 = (A1 * C2 - A2 * C1) / det;
            boolean flag1 = (x0 <= Math.max(x1, x2)) || (Math.abs(x0 - Math.max(x1, x2)) <= EPS), 
                    flag2 = (x0 >= Math.min(x1, x2)) || (Math.abs(x0 - Math.min(x1, x2)) <= EPS),
                    flag3 = (y0 <= Math.max(y1, y2)) || (Math.abs(y0 - Math.max(y1, y2)) <= EPS),
                    flag4 = (y0 >= Math.min(y1, y2)) || (Math.abs(y0 - Math.min(y1, y2)) <= EPS);
            if(flag1 && flag2 && flag3 && flag4)
                return new Point(x0, y0);
        }

        return null;
    }

    static void antiClockWiseSort(ArrayList<Point> li){
        double xSum = 0.0d, ySum = 0.0d, n = li.size();
        for(Point pt : li){
            xSum += pt.x;
            ySum += pt.y;
        }

        xSum /= n;
        ySum /= n;

        final double xC = xSum, yC = ySum;
        Collections.sort(li, (a, b) -> {
            double a1 = (Math.toDegrees(Math.atan2(a.x - xC, a.y - yC)) + 360) % 360;
            double a2 = (Math.toDegrees(Math.atan2(b.x - xC, b.y - yC)) + 360) % 360;
            return -Double.compare(a1, a2);
        });
    }

    static double shoeLaceTheorem(ArrayList<Point> li){
        antiClockWiseSort(li);
        double area = 0.0d, x1 = 0.0d, x2 = 0.0d, y1 = 0.0d, y2 = 0.0d;
        int n = li.size();

        for(int i = 0; i < n; i++){
            int idx1 = i, idx2 = (i + 1) % n;
            Point p1 = li.get(idx1), p2 = li.get(idx2);
            x1 = p1.x;
            x2 = p2.x;

            y1 = p1.y;
            y2 = p2.y;

            area += Math.abs(x1 * y2 - x2 * y1);
        }

        area /= 2.0d;
        return area;
    }

    static Point rotate(Point pt, double a){
        double x = pt.x, y = pt.y, _x = 0.0d, _y = 0.0d;
        _x = x * Math.cos(a) + y * Math.sin(a);
        _y = -x * Math.sin(a) + y * Math.cos(a);
        return new Point(_x, _y);
    }

    public static void process(int test_number)throws IOException
    {
        double w = nd(), h = nd(), a = nd(), area = 0.0d;
        if(a <= Math.pow(10.0d, -6) || 180 - a <= Math.pow(10.0d, -6)){
            area = w * h;
            pn(area);
            return ;
        }        

        Point point[] = new Point[4], _point[] = new Point[4];
        point[0] = new Point(-w / 2.0d, h / 2.0d);
        point[1] = new Point(w / 2.0d, h / 2.0d);
        point[2] = new Point(w / 2.0d, -h / 2.0d);
        point[3] = new Point(-w / 2.0d, -h / 2.0d);

        a *= Math.PI / 180.0d;
        for(int i = 0; i < 4; i++){
            _point[i] = rotate(point[i], a);
            //trace( _point[i].x, _point[i].y);
        }

        ArrayList<Point> li = new ArrayList<>();
        for(int i = 0; i <= 3; i++)
            for(int j = 0; j <= 3; j++){
                int idx1 = (i + 1) % 4, idx2 = (j + 1) % 4;
                Point intersect = lineSegIntersection(point[i], point[idx1], _point[j], _point[idx2]);
                if(intersect != null){
                    //trace(intersect.x, intersect.y);
                    li.add(intersect);
                }
            }

        area = shoeLaceTheorem(li);
        out.printf("%.6f\n", area);
    }
 
    static final long mod = (long)1e9+7l;
    static boolean DEBUG = true;
    static FastReader sc;
    static PrintWriter out;
    public static void main(String[]args)throws IOException
    {
        out = new PrintWriter(System.out);
        sc = new FastReader();
 
        long s = System.currentTimeMillis();
        int t = 1;
        for(int i = 1; i <= t; i++)
            process(i);
 
        out.flush();
        System.err.println(System.currentTimeMillis()-s+"ms");
    }

    static void trace(Object... o){ if(!DEBUG) return; System.err.println(Arrays.deepToString(o)); };    
    static void pn(Object o){ out.println(o); }
    static void p(Object o){ out.print(o); }
    static int ni()throws IOException{ return Integer.parseInt(sc.next()); }
    static long nl()throws IOException{ return Long.parseLong(sc.next()); }
    static double nd()throws IOException{ return Double.parseDouble(sc.next()); }
    static String nln()throws IOException{ return sc.nextLine(); }
    static long gcd(long a, long b){ return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b){ return (b==0)?a:gcd(b,a%b); }
    
    static class FastReader{ 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader(){ 
            br = new BufferedReader(new InputStreamReader(System.in)); 
        } 
  
        String next(){ 
            while (st == null || !st.hasMoreElements()){ 
                try{ st = new StringTokenizer(br.readLine()); } catch (IOException  e){ e.printStackTrace(); } 
            } 
            return st.nextToken(); 
        } 
  
        String nextLine(){ 
            String str = ""; 
            try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } 
            return str; 
        } 
    } 
}