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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793;
const double tau = 6.283185307179586;
const double epsilon = 1e-6;
using namespace std;
double W, H, THETA;
pair<pair<double, double>, pair<double, double> > make_segment(double x1,
                                                               double y1,
                                                               double x2,
                                                               double y2) {
  return pair<pair<double, double>, pair<double, double> >(
      pair<double, double>(x1, y1), pair<double, double>(x2 - x1, y2 - y1));
}
double cross(pair<double, double> v, pair<double, double> w) {
  return v.first * w.second - v.second * w.first;
}
vector<pair<double, double> > intersections;
void intersect(pair<pair<double, double>, pair<double, double> > s1,
               pair<pair<double, double>, pair<double, double> > s2) {
  pair<double, double> p = s1.first;
  pair<double, double> r = s1.second;
  pair<double, double> q = s2.first;
  pair<double, double> s = s2.second;
  if (cross(r, s) == 0) return;
  pair<double, double> qp =
      pair<double, double>(q.first - p.first, q.second - p.second);
  double t = cross(qp, s) / cross(r, s);
  double u = cross(qp, r) / cross(r, s);
  if (0.0 <= t && t <= 1.0 && 0.0 <= u && u <= 1.0) {
    intersections.push_back(
        pair<double, double>(p.first + t * r.first, p.second + t * r.second));
  }
}
int main(int argc, const char* argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> W >> H >> THETA;
  THETA *= tau / 360;
  if (abs(THETA - 0) < epsilon || abs(THETA - tau / 2.0) < epsilon) {
    cout << fixed << setprecision(8) << W * H << '\n';
  } else {
    pair<pair<double, double>, pair<double, double> > top =
        make_segment(-W / 2, H / 2, W / 2, H / 2);
    pair<pair<double, double>, pair<double, double> > right =
        make_segment(W / 2, H / 2, W / 2, -H / 2);
    pair<pair<double, double>, pair<double, double> > bottom =
        make_segment(W / 2, -H / 2, -W / 2, -H / 2);
    pair<pair<double, double>, pair<double, double> > left =
        make_segment(-W / 2, -H / 2, -W / 2, H / 2);
    pair<pair<double, double>, pair<double, double> > rtop =
        make_segment((-W / 2 * cos(THETA)) - (H / 2 * sin(THETA)),
                     (-W / 2 * sin(THETA)) + (H / 2 * cos(THETA)),
                     (W / 2 * cos(THETA)) - (H / 2 * sin(THETA)),
                     (W / 2 * sin(THETA)) + (H / 2 * cos(THETA)));
    pair<pair<double, double>, pair<double, double> > rright =
        make_segment((W / 2 * cos(THETA)) - (H / 2 * sin(THETA)),
                     (W / 2 * sin(THETA)) + (H / 2 * cos(THETA)),
                     (W / 2 * cos(THETA)) - (-H / 2 * sin(THETA)),
                     (W / 2 * sin(THETA)) + (-H / 2 * cos(THETA)));
    pair<pair<double, double>, pair<double, double> > rbottom =
        make_segment((W / 2 * cos(THETA)) - (-H / 2 * sin(THETA)),
                     (W / 2 * sin(THETA)) + (-H / 2 * cos(THETA)),
                     (-W / 2 * cos(THETA)) - (-H / 2 * sin(THETA)),
                     (-W / 2 * sin(THETA)) + (-H / 2 * cos(THETA)));
    pair<pair<double, double>, pair<double, double> > rleft =
        make_segment((-W / 2 * cos(THETA)) - (-H / 2 * sin(THETA)),
                     (-W / 2 * sin(THETA)) + (-H / 2 * cos(THETA)),
                     (-W / 2 * cos(THETA)) - (H / 2 * sin(THETA)),
                     (-W / 2 * sin(THETA)) + (H / 2 * cos(THETA)));
    intersect(rtop, top);
    intersect(rright, top);
    intersect(rbottom, top);
    intersect(rright, right);
    intersect(rbottom, right);
    intersect(rleft, right);
    intersect(rbottom, bottom);
    intersect(rleft, bottom);
    intersect(rtop, bottom);
    intersect(rleft, left);
    intersect(rtop, left);
    intersect(rright, left);
    intersections.push_back(intersections[0]);
    double l = 0, r = 0;
    for (int i = 0; i < ((int)intersections.size()) - 1; i++) {
      l += intersections[i].first * intersections[i + 1].second;
      r += intersections[i].second * intersections[i + 1].first;
    }
    cout << fixed << setprecision(9) << abs(r - l) / 2.0 << '\n';
  }
  return 0;
}