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.141592653589793116;
struct Point {
  double x, y;
  Point(double _x = 0.0, double _y = 0.0) {
    this->x = _x;
    this->y = _y;
  }
  bool operator<(const Point &v) const {
    if (v.x == this->x)
      return this->y < v.y;
    else
      return this->x < v.x;
  }
  Point operator-(const Point &p) {
    Point result;
    result.x = this->x - p.x;
    result.y = this->y - p.y;
    return result;
  }
  bool operator==(const Point &p) const {
    return (this->x == p.x and this->y == p.y);
  }
  double crossProduct(const Point &p) {
    return ((this->x * p.y) - (this->y * p.x));
  }
} originais[5], rotacionados[5], pivot;
bool mi(double a, double b) { return (a > b) or (fabs(a - b) <= 1e-9); }
struct LineSegment {
  double A, B, C, xl, xr, yl, yr;
  LineSegment(const Point &p1 = Point(0, 0), const Point &p2 = Point(0, 0)) {
    this->A = (p2.y - p1.y);
    this->B = (p2.x - p1.x) * (-1.0);
    this->C = (this->A * p1.x) + (this->B * p1.y);
    this->xl = min(p1.x, p2.x);
    this->xr = max(p1.x, p2.x);
    this->yl = min(p1.y, p2.y);
    this->yr = max(p1.y, p2.y);
  }
  bool intersects(LineSegment &s, Point &p) {
    if (fabs((this->A * s.B) - (this->B * s.A)) <= 1e-9) return false;
    double x = ((this->C * s.B) - (this->B * s.C)) /
               ((this->A * s.B) - (this->B * s.A));
    double y = ((this->C * s.A) - (this->A * s.C)) /
               ((this->B * s.A) - (this->A * s.B));
    p = Point(x, y);
    bool cond1, cond2;
    if (mi(x, this->xl) and mi(this->xr, x) and mi(y, this->yl) and
        mi(this->yr, y))
      cond1 = true;
    else
      cond1 = false;
    if (mi(x, s.xl) and mi(s.xr, x) and mi(y, s.yl) and mi(s.yr, y))
      cond2 = true;
    else
      cond2 = false;
    return (cond1 and cond2);
  }
} segmentosOriginais[6], segmentosRotacionados[6];
Point rotate(Point p, double alfa) {
  double rad = alfa * pi / 180.0;
  return Point(p.x * cos(rad) - p.y * sin(rad),
               p.x * sin(rad) + p.y * cos(rad));
}
double squareDist(Point f, Point s) {
  return ((f.x - s.x) * (f.x - s.x) + (f.y - s.y) * (f.y - s.y));
}
bool compare(Point a, Point b) {
  if (a == pivot) return true;
  if (b == pivot) return false;
  Point normal = a - pivot;
  Point normal2 = b - pivot;
  double produto = normal.crossProduct(normal2);
  if (produto == 0) return squareDist(a, pivot) < squareDist(b, pivot);
  if (produto > 0)
    return true;
  else
    return false;
}
void printa(Point &p) { printf("[%f, %f]\n", p.x, p.y); }
double area(const vector<Point> &pontos) {
  int qtdPontos = ((int)pontos.size());
  double x1, y1, x2, y2, ans = 0.0;
  for (int i = 0; i < qtdPontos - 1; i++) {
    x1 = pontos[i].x;
    x2 = pontos[i + 1].x;
    y1 = pontos[i].y;
    y2 = pontos[i + 1].y;
    ans += (x1 * y2 - x2 * y1);
  }
  return fabs(ans) / 2.0;
}
int main() {
  double w, h, alfa;
  int dae, lado1, lado2;
  scanf("%d %d %d", &lado1, &lado2, &dae);
  w = (double)lado1;
  h = (double)lado2;
  alfa = (double)dae;
  if (lado1 == 0 or lado2 == 0) {
    printf("0\n");
    return 0;
  }
  originais[0] = Point(-w / 2.0, -h / 2.0);
  originais[1] = Point(w / 2.0, -h / 2.0);
  originais[2] = Point(w / 2.0, h / 2.0);
  originais[3] = Point(-w / 2.0, h / 2.0);
  for (int i = 0; i < 4; i++)
    rotacionados[i] = rotate(originais[i], (double)alfa);
  if (dae == 90) {
    long long ans = min(lado1, lado2);
    ans *= ans;
    printf("%lld\n", ans);
    return 0;
  } else if (dae == 0 or dae == 180) {
    vector<Point> pontos;
    for (int i = 0; i < 4; i++) pontos.push_back(originais[i]);
    pontos.push_back(originais[0]);
    printf("%0.f\n", area(pontos));
  } else {
    for (int i = 0; i < 3; i++)
      segmentosOriginais[i] = LineSegment(originais[i], originais[i + 1]);
    segmentosOriginais[3] = LineSegment(originais[3], originais[0]);
    for (int i = 0; i < 3; i++)
      segmentosRotacionados[i] =
          LineSegment(rotacionados[i], rotacionados[i + 1]);
    segmentosRotacionados[3] = LineSegment(rotacionados[3], rotacionados[0]);
    vector<Point> aux;
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < 4; j++) {
        Point gamb = Point(0, 0);
        if (segmentosRotacionados[i].intersects(segmentosOriginais[j], gamb))
          aux.push_back(gamb);
      }
    }
    pivot = aux[0];
    for (int i = 1; i < ((int)aux.size()); i++) {
      if (aux[i] < pivot) pivot = aux[i];
    }
    sort(aux.begin(), aux.end(), compare);
    aux.push_back(aux[0]);
    printf("%.8f\n", (area(aux)));
  }
  return 0;
}