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 int INSIDE = 0;
const int LEFT = 1;
const int RIGHT = 2;
const int BOTTOM = 4;
const int TOP = 8;
double xmax, xmin, ymax, ymin;
int Computeint(double x, double y) {
  int code;
  code = INSIDE;
  if (x < xmin)
    code |= LEFT;
  else if (x > xmax)
    code |= RIGHT;
  if (y < ymin)
    code |= BOTTOM;
  else if (y > ymax)
    code |= TOP;
  return code;
}
bool LineClip(double& x0, double& y0, double& x1, double& y1) {
  int outcode0 = Computeint(x0, y0);
  int outcode1 = Computeint(x1, y1);
  bool accept = false;
  while (true) {
    if (!(outcode0 | outcode1)) {
      accept = true;
      break;
    } else if (outcode0 & outcode1) {
      break;
    } else {
      double x, y;
      int outcodeOut = outcode0 ? outcode0 : outcode1;
      if (outcodeOut & TOP) {
        x = x0 + (x1 - x0) * (ymax - y0) / (y1 - y0);
        y = ymax;
      } else if (outcodeOut & BOTTOM) {
        x = x0 + (x1 - x0) * (ymin - y0) / (y1 - y0);
        y = ymin;
      } else if (outcodeOut & RIGHT) {
        y = y0 + (y1 - y0) * (xmax - x0) / (x1 - x0);
        x = xmax;
      } else if (outcodeOut & LEFT) {
        y = y0 + (y1 - y0) * (xmin - x0) / (x1 - x0);
        x = xmin;
      }
      if (outcodeOut == outcode0) {
        x0 = x;
        y0 = y;
        outcode0 = Computeint(x0, y0);
      } else {
        x1 = x;
        y1 = y;
        outcode1 = Computeint(x1, y1);
      }
    }
  }
  return accept;
}
double angle(double a, double b) {
  double ans = atan(b / a);
  if (a < 0 && b >= 0)
    ans += (3.1415926535897932384626433);
  else if (a < 0 && b < 0)
    ans += (3.1415926535897932384626433);
  else if (a >= 0 && b < 0)
    ans += (2 * 3.1415926535897932384626433);
  return ans;
}
vector<double> ans_x;
vector<double> ans_y;
bool find(double a, double b) {
  bool f = false;
  for (int i = 0; i < ((int)(ans_x).size()); i++) {
    if (ans_x[i] == a && ans_y[i] == b) {
      f = true;
      break;
    }
  }
  return !f;
}
int main() {
  double tmp_start = clock();
  fprintf(stderr, "Start\n");
  int w = ({
    int x;
    scanf("%d", &x);
    x;
  }),
      h = ({
        int x;
        scanf("%d", &x);
        x;
      }),
      alpha = ({
        int x;
        scanf("%d", &x);
        x;
      });
  xmax = (double)h / 2;
  xmin = -xmax;
  ymax = (double)w / 2;
  ymin = -ymax;
  double theta = (double)(alpha * 3.1415926535897932384626433) / 180.0;
  ans_x.clear();
  ans_y.clear();
  double a_x = (double)h / 2;
  double a_y = (double)w / 2;
  double b_x = (double)h / 2;
  double b_y = -(double)w / 2;
  double c_x = (a_x * cos(theta)) - (a_y * sin(theta));
  double c_y = (a_x * sin(theta)) + (a_y * cos(theta));
  double d_x = (b_x * cos(theta)) - (b_y * sin(theta));
  double d_y = (b_x * sin(theta)) + (b_y * cos(theta));
  if (LineClip(c_x, c_y, d_x, d_y)) {
    double ta = angle(c_x, c_y);
    double tb = angle(d_x, d_y);
    if (fabs(tb - ta) > 3.1415926535897932384626433) {
      if (tb < ta)
        tb += (2 * 3.1415926535897932384626433);
      else
        ta += (2 * 3.1415926535897932384626433);
    }
    if (ta < tb) {
      if (find(c_x, c_y)) {
        ans_x.push_back(c_x);
        ans_y.push_back(c_y);
      }
      if (find(d_x, d_y)) {
        ans_x.push_back(d_x);
        ans_y.push_back(d_y);
      }
    } else {
      if (find(d_x, d_y)) {
        ans_x.push_back(d_x);
        ans_y.push_back(d_y);
      }
      if (find(c_x, c_y)) {
        ans_x.push_back(c_x);
        ans_y.push_back(c_y);
      }
    }
  }
  a_x = (double)h / 2;
  a_y = (double)w / 2;
  b_x = -(double)h / 2;
  b_y = (double)w / 2;
  c_x = (a_x * cos(theta)) - (a_y * sin(theta));
  c_y = (a_x * sin(theta)) + (a_y * cos(theta));
  d_x = (b_x * cos(theta)) - (b_y * sin(theta));
  d_y = (b_x * sin(theta)) + (b_y * cos(theta));
  if (LineClip(c_x, c_y, d_x, d_y)) {
    double ta = angle(c_x, c_y);
    double tb = angle(d_x, d_y);
    if (fabs(tb - ta) > 3.1415926535897932384626433) {
      if (tb < ta)
        tb += (2 * 3.1415926535897932384626433);
      else
        ta += (2 * 3.1415926535897932384626433);
    }
    if (ta < tb) {
      if (find(c_x, c_y)) {
        ans_x.push_back(c_x);
        ans_y.push_back(c_y);
      }
      if (find(d_x, d_y)) {
        ans_x.push_back(d_x);
        ans_y.push_back(d_y);
      }
    } else {
      if (find(d_x, d_y)) {
        ans_x.push_back(d_x);
        ans_y.push_back(d_y);
      }
      if (find(c_x, c_y)) {
        ans_x.push_back(c_x);
        ans_y.push_back(c_y);
      }
    }
  }
  a_x = -(double)h / 2;
  a_y = -(double)w / 2;
  b_x = -(double)h / 2;
  b_y = (double)w / 2;
  c_x = (a_x * cos(theta)) - (a_y * sin(theta));
  c_y = (a_x * sin(theta)) + (a_y * cos(theta));
  d_x = (b_x * cos(theta)) - (b_y * sin(theta));
  d_y = (b_x * sin(theta)) + (b_y * cos(theta));
  if (LineClip(c_x, c_y, d_x, d_y)) {
    double ta = angle(c_x, c_y);
    double tb = angle(d_x, d_y);
    if (fabs(tb - ta) > 3.1415926535897932384626433) {
      if (tb < ta)
        tb += (2 * 3.1415926535897932384626433);
      else
        ta += (2 * 3.1415926535897932384626433);
    }
    if (ta < tb) {
      if (find(c_x, c_y)) {
        ans_x.push_back(c_x);
        ans_y.push_back(c_y);
      }
      if (find(d_x, d_y)) {
        ans_x.push_back(d_x);
        ans_y.push_back(d_y);
      }
    } else {
      if (find(d_x, d_y)) {
        ans_x.push_back(d_x);
        ans_y.push_back(d_y);
      }
      if (find(c_x, c_y)) {
        ans_x.push_back(c_x);
        ans_y.push_back(c_y);
      }
    }
  }
  a_x = (double)h / 2;
  a_y = -(double)w / 2;
  b_x = -(double)h / 2;
  b_y = -(double)w / 2;
  c_x = (a_x * cos(theta)) - (a_y * sin(theta));
  c_y = (a_x * sin(theta)) + (a_y * cos(theta));
  d_x = (b_x * cos(theta)) - (b_y * sin(theta));
  d_y = (b_x * sin(theta)) + (b_y * cos(theta));
  if (LineClip(c_x, c_y, d_x, d_y)) {
    double ta = angle(c_x, c_y);
    double tb = angle(d_x, d_y);
    if (fabs(tb - ta) > 3.1415926535897932384626433) {
      if (tb < ta)
        tb += (2 * 3.1415926535897932384626433);
      else
        ta += (2 * 3.1415926535897932384626433);
    }
    if (ta < tb) {
      if (find(c_x, c_y)) {
        ans_x.push_back(c_x);
        ans_y.push_back(c_y);
      }
      if (find(d_x, d_y)) {
        ans_x.push_back(d_x);
        ans_y.push_back(d_y);
      }
    } else {
      if (find(d_x, d_y)) {
        ans_x.push_back(d_x);
        ans_y.push_back(d_y);
      }
      if (find(c_x, c_y)) {
        ans_x.push_back(c_x);
        ans_y.push_back(c_y);
      }
    }
  }
  double area = 0;
  double N = ((int)(ans_x).size());
  for (int i = 1; i + 1 < N; i++) {
    double x1 = ans_x[i] - ans_x[0];
    double y1 = ans_y[i] - ans_y[0];
    double x2 = ans_x[i + 1] - ans_x[0];
    double y2 = ans_y[i + 1] - ans_y[0];
    double cross = x1 * y2 - x2 * y1;
    area += cross;
  }
  printf("%0.9lf\n", fabs(area / 2.0));
  fprintf(stderr, "Total time = %.2lf sec\n",
          (double)(clock() - tmp_start) / CLOCKS_PER_SEC);
  return 0;
}