Problem

Find the angle between the two given angles θ1 and θ2. Here, the angle between them is defined as "θ1 & plus; t'when t'is the one with the smallest absolute value among the t satisfying θ1 & plus; t = θ2 − t" as shown in the figure below.

A image of angles

Constraints

The input satisfies the following conditions.

* Angle is expressed in degrees
* 0 ≤ θ1, θ2 <360
* θ1 and θ2 are integers
* | θ1 − θ2 | ≠ 180
* No input is given that gives the answer [0,0.0001] or [359.999,360)

Input

The input is given in the following format.


θ1
θ2


Output

Output the angle between θ1 and θ2 in one line in the range [0,360) in degrees. However, it must not include an error exceeding 0.0001.

Examples

Input

10
20


Output

15.0


Input

20
350


Output

5.0

Source: aizu | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
s1 = int(input())
s2 = int(input())
a = min(s1, s2)
b = max(s1, s2)
if b - a > 180:
	print((b + (360 - b + a) / 2) % 360)
else:
	print((a + b) / 2)


t1 = int(input())
t2 = int(input())
if not t1 < t2:
	(t1, t2) = (t2, t1)
if t2 - t1 <= 180:
	print((t2 + t1) / 2)
else:
	print((t2 + t1 + 360) % 720 / 2)


angs = [int(input()), int(input())]
angs.sort()
if angs[1] - angs[0] > 180:
	ans = sum(angs) / 2 + 180
	if ans >= 360:
		ans -= 360
	print(ans)
else:
	print(sum(angs) / 2)


s1 = int(input())
s2 = int(input())
if s1 > s2:
	(s1, s2) = (s2, s1)
if s2 - s1 < 180:
	print((s1 + s2) / 2)
elif (s1 + s2) / 2 + 180 < 360:
	print((s1 + s2) / 2 + 180)
else:
	print((s1 + s2) / 2 - 180)


(a, b) = (int(input()), int(input()))
print((a + b) / 2 % 360 if abs(a - b) % 360 < 180 else (a + b + 360) / 2 % 360)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7

def LI():
	return list(map(int, input().split()))

def LF():
	return list(map(float, input().split()))

def LS():
	return input().split()

def I():
	return int(input())

def F():
	return float(input())

def S():
	return input()

def main():
	a = I()
	b = I()
	if a > b:
		(a, b) = (b, a)
	if b - a > a + 360 - b:
		a += 360
	return (a + b) / 2.0 % 360
print(main())


(a, b) = (int(input()), int(input()))
print((a + b + 360 * (abs(a - b) > 180)) / 2 % 360)


a = int(input())
b = int(input())
a = a % 360
b = b % 360
if a > b:
	(a, b) = (b, a)
if b - a > 180:
	a += 360
t = abs((a - b) / 2)
ans = min(a, b) + t
ans = ans % 360
print('{:6f}'.format(ans))


t1 = int(input())
t2 = int(input())
x = (t2 - t1) / 2
a = x
for i in range(-2, 3):
	t = x + i * 180
	if abs(a) > abs(t):
		a = t
ans = t1 + a
while ans < 0:
	ans += 360
while ans > 360:
	ans -= 360
print(ans)


a = int(input())
b = int(input())
(a, b) = (min(a, b), max(a, b))
if b - a <= 180:
	print((a + b) / 2)
else:
	print((a + b + 360) % 720 / 2)


a = float(input())
b = float(input())
if a > b:
	(a, b) = (b, a)
ansa = (a + b) / 2
ta = abs(a - ansa)
if ansa < 0:
	ansa += 360.0
ansb = (a + b - 360) / 2
tb = abs(a - ansb)
if ansb < 0:
	ansb += 360.0
if ta < tb:
	print(ansa)
else:
	print(ansb)