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.

Source: codeforces | Difficulty: HARD
Tags: Geometry


Solutions:
import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)
(w, h, a) = map(int, input().split())
if a == 0 or a == 180:
	print(w * h)
else:
	(w, h) = (max(w, h), min(w, h))
	if a > 90:
		a = 180 - a
	a = a * math.pi / 180
	if h * (1 + math.cos(a)) < w * math.sin(a):
		print(pow(h, 2) / math.sin(a))
	else:
		x = h - w * ((math.cos(a) + 1) / math.sin(a))
		t = math.tan(a) - (math.cos(a) + 1) * (math.cos(a) + 1) / (math.cos(a) * math.sin(a))
		x = x / t
		x = abs(x)
		b2 = w - x - x / math.cos(a)
		b2 = abs(b2)
		h2 = b2 / math.tan(a)
		h2 = abs(h2)
		h1 = h - h2 - h2 / math.cos(a)
		h1 = abs(h1)
		tbm = x * h1 + b2 * h2
		print(h * w - tbm)


import math

def rot_by_a(p, a):
	return (p[0] * math.cos(a) - p[1] * math.sin(a), p[0] * math.sin(a) + p[1] * math.cos(a))
(h, w, alpha) = map(int, input().split())
if h > w:
	(h, w) = (w, h)
if alpha > 90:
	alpha = 180 - alpha
ang = math.radians(alpha)
b = 2 * math.atan(h / w)
if alpha == 0:
	print(h * w)
elif alpha == 90:
	print(h * h)
elif ang > b:
	side = h / math.sin(ang)
	print(side * h)
else:
	left_top = (w / 2, h / 2)
	rot_left_top = rot_by_a(left_top, ang)
	tri_h = rot_left_top[1] - left_top[1]
	tri_base = tri_h / math.tan(ang) + tri_h / math.tan(math.pi / 2 - ang)
	longer_cathetus = tri_base * math.cos(ang)
	smaller_tri_smaller_cathetus = w - tri_base - longer_cathetus
	smaller_tri_longer_cathetus = smaller_tri_smaller_cathetus / math.tan(ang)
	print(w * h - tri_base * tri_h - smaller_tri_smaller_cathetus * smaller_tri_longer_cathetus)


from math import sin, cos, pi, atan2
(w, h, a) = tuple(map(int, input().split()))
if a in [0, 180]:
	print(w * h)
elif a == 90:
	print(min(w, h) ** 2)
else:
	a *= pi / 180
	w /= 2
	h /= 2
	base = [(w, h), (-w, h), (-w, -h), (w, -h)]
	rot = [(x * cos(a) - y * sin(a), x * sin(a) + y * cos(a)) for (x, y) in base]
	pol = []
	for (i, j) in zip(range(-1, 3), range(4)):
		t = (w - rot[i][0]) / (rot[j][0] - rot[i][0])
		if 0 <= t <= 1:
			pol.append((w, rot[i][1] + (rot[j][1] - rot[i][1]) * t))
		t = (-w - rot[i][0]) / (rot[j][0] - rot[i][0])
		if 0 <= t <= 1:
			pol.append((-w, rot[i][1] + (rot[j][1] - rot[i][1]) * t))
		t = (h - rot[i][1]) / (rot[j][1] - rot[i][1])
		if 0 <= t <= 1:
			pol.append((rot[i][0] + (rot[j][0] - rot[i][0]) * t, h))
		t = (-h - rot[i][1]) / (rot[j][1] - rot[i][1])
		if 0 <= t <= 1:
			pol.append((rot[i][0] + (rot[j][0] - rot[i][0]) * t, -h))
	pol.sort(key=lambda x: atan2(*x))
	print('%0.9f' % (sum([abs(pol[i][0] * pol[j][1] - pol[i][1] * pol[j][0]) for (i, j) in zip(range(-1, len(pol) - 1), range(len(pol)))]) / 2))


from math import sin, cos, tan, atan, pi

def main():
	(w, h, a) = map(int, input().split())
	a = min(a, 180 - a) * pi / 180
	if h > w:
		(h, w) = (w, h)
	if h * (1 + cos(a)) < w * sin(a):
		res = h * h / sin(a)
	else:
		res = h * w - ((w - h * tan(a / 2)) ** 2 * tan(a) + (h - w * tan(a / 2)) ** 2 * tan(a)) / 4
	print('{:.9f}'.format(res))
main()