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 long long oo = 1LL << 60;
const int kNumMoves = 4;
const int kMoves[kNumMoves][2] = {{1, 0}, {-1, 0}, {0, -1}, {0, 1}};
struct Line {
  Line() {}
  Line(pair<double, double> A, pair<double, double> B) : a(A), b(B) {}
  pair<double, double> a;
  pair<double, double> b;
};
enum {
  TOP,
  LEFT,
  RIGHT,
  BOTTOM,
};
const double kPi = 3.1415926535897932384626433;
pair<double, double> Rotate(pair<double, double> p, double ang) {
  pair<double, double> a;
  a.first = p.first * cos(ang) - p.second * sin(ang);
  a.second = p.first * sin(ang) + p.second * cos(ang);
  return a;
}
const double kEps = 10E-9;
double Det(pair<double, double> a, pair<double, double> b) {
  return a.first * b.second - a.second * b.first;
}
pair<double, double> GetIntersection(Line& l1, Line& l2) {
  double D1 = Det(l1.a, l1.b);
  double dx1 = l1.a.first - l1.b.first;
  double dy1 = l1.a.second - l1.b.second;
  double D2 = Det(l2.a, l2.b);
  double dx2 = l2.a.first - l2.b.first;
  double dy2 = l2.a.second - l2.b.second;
  double DET = (dx1 * dy2 - dy1 * dx2);
  double x = (dx2 * D1 - dx1 * D2) / DET;
  double y = (dy2 * D1 - dy1 * D2) / DET;
  return pair<double, double>(x, y);
}
double GetLength(pair<double, double> a, pair<double, double> b) {
  double dx = a.first - b.first;
  double dy = a.second - b.second;
  return sqrt(dx * dx + dy * dy);
}
int main() {
  int W, H, Angle;
  cin >> W >> H >> Angle;
  double w = W;
  double h = H;
  if (Angle == 0 || Angle == 180) {
    cout << std::fixed << setprecision(20) << w * h;
    return 0;
  }
  if (W == H && Angle == 90) {
    cout << std::fixed << setprecision(20) << w * w;
    return 0;
  }
  double angle = Angle;
  if (w < h) swap(w, h);
  if (angle > 90) angle = 180 - angle;
  angle = kPi * (angle / 180.0);
  vector<Line> lines(4);
  lines[TOP] = Line(pair<double, double>(-0.5 * w, 0.5 * h),
                    pair<double, double>(0.5 * w, 0.5 * h));
  lines[LEFT] = Line(pair<double, double>(-0.5 * w, -0.5 * h),
                     pair<double, double>(-0.5 * w, 0.5 * h));
  lines[BOTTOM] = Line(pair<double, double>(-0.5 * w, -0.5 * h),
                       pair<double, double>(0.5 * w, -0.5 * h));
  lines[RIGHT] = Line(pair<double, double>(0.5 * w, -0.5 * h),
                      pair<double, double>(0.5 * w, 0.5 * h));
  vector<Line> rotated(4);
  for (int i = 0; i < int(4); ++i) {
    Line& l = lines[i];
    rotated[i].a = Rotate(l.a, angle);
    rotated[i].b = Rotate(l.b, angle);
  }
  double area = 0;
  pair<double, double> T = GetIntersection(lines[TOP], rotated[TOP]);
  if (rotated[0].a.first < lines[LEFT].a.first) {
    pair<double, double> TL = GetIntersection(lines[LEFT], rotated[TOP]);
    area = GetLength(lines[TOP].a, TL) * GetLength(lines[TOP].a, T);
    pair<double, double> BL = GetIntersection(lines[LEFT], rotated[LEFT]);
    pair<double, double> B = GetIntersection(rotated[LEFT], lines[BOTTOM]);
    area += GetLength(lines[BOTTOM].a, BL) * GetLength(lines[BOTTOM].a, B);
  } else {
    pair<double, double> B = GetIntersection(lines[BOTTOM], rotated[TOP]);
    area = 2 * h * (B.first - lines[BOTTOM].a.first);
    area += GetLength(T, pair<double, double>(B.first, T.second)) * h;
  }
  double netArea = w * h - area;
  cout << std::fixed << setprecision(20) << netArea << endl;
  int i;
  cin >> i;
  return 0;
}