13990 - ClockHands   

Description

After being woken up by Noah's alarm clock, Hank, in his anger, looked at his wristwatch.

He was very curious about the angle formed by the hour hand and the minute hand, but he didn't have a protractor at hand to measure it.

So, he decided to borrow a protractor from Noah.

However, since Noah was still sleeping, Hank has no choice but to seek your help in solving this problem. Hank will tell you the current time displayed on his watch in 24-hour format.

Please help him determine the angle between the hour hand (時針) and the minute hand (分針) on the clock (there are two possible angles; provide the smaller one as the answer).

Input

The input consists of a single line in the format h:m, where h and m are guaranteed to be 2-digit integers.

This represents the time displayed on Hank's watch, with h indicating the hour and m indicating the minute.

Constraints:

  • 0 <= h <= 23, 0 <= m <= 59

Output

Please output the smallest angle between the hour and minute hands, rounded to three decimal places.

The answer should be in the range of 0 to 180.

Please remember to print "\n" at the end.

Sample Input  Download

Sample Output  Download

Tags




Discuss