Time Limit : sec, Memory Limit : KB
Japanese

Problem A: The Mean of Angles

Problem

与えられた2つの角度θ1,θ2 のちょうど間の角度を求めよ。ここで、ちょうど間の角度を、下図のように「θ1 + t = θ2t を満たすtのうち絶対値が最も小さいものをt’としたときのθ1 + t’」と定義する。

A image of angles

Input

入力は以下の形式で与えられる。

θ1
θ2

Constraints

入力は以下の条件を満たす。

  • 角度は度数法(degree)で表される
  • 0 ≤ θ1, θ2 < 360
  • θ1, θ2は整数
  • |θ1θ2| ≠ 180
  • 解答が[0,0.0001]または[359.999, 360)になるような入力は与えられない

Output

θ1,θ2のちょうど間の角度を度数法で[0,360)の範囲で1行に出力せよ。ただし0.0001を超える誤差を含んではならない。

Sample Input 1

10
20

Sample Output 1

15.0

Sample Input 2

20
350

Sample Output 2

5.0

Note

Link