Under construction

Still being built. Things may change

Clock Tower

Interview

Time limit1sMemory limit1024 MB

Summary
Given the minute M that the altered minute hand points to, find the true minute and print it with one decimal place.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Geunseong ordered a Java chip frappuccino at a cafe next to Engineering Building 7, then suddenly wondered about something and asked the barista.

Do you have a C++ chip frappuccino?

The barista, angered by Geunseong's absurd question, tied Geunseong to the minute hand of the clock tower right in front of the cafe.

Then the minute hand of the clock tower began to move strangely under Geunseong's weight. The minute hand repeats the following pattern every hour.

  1. At the top of every hour, the minute hand points to 12.
  2. From the top of the hour until 15 minutes, the minute hand moves clockwise at 22 times the normal speed of a minute hand. In other words, in 1515 minutes the minute hand moves clockwise from 12 to 6.
  3. At 15 minutes past the hour, the minute hand points to 6.
  4. From 15 minutes past the hour until the next top of the hour, the minute hand moves clockwise at 23\frac{2}{3} times the normal speed of a minute hand. In other words, in 4545 minutes the minute hand moves clockwise from 6 back to 12.

On a normal clock tower, the minute hand points exactly to 12 at the top of every hour and turns clockwise one full revolution per hour at a constant speed.

The hour hand of the altered clock tower turns exactly as on a normal clock tower, so it causes no trouble. However, people have started to lose track of what the actual minute is.

Look at the altered clock tower and find the correct time to tell the people.

Input

The input is a single integer MM, the minute that the minute hand of the altered clock tower points to.

Output

Print a real number that represents the correct minute of the time. The value must be printed with exactly one digit after the decimal point. It can always be proven that the exact answer can be printed.

Constraints

  • 0≤M≤590\le M\le 59
  • MM is an integer given as input.

Examples2

  1. Example 1

    Input
    16
    
    Expected output
    8.0
    
  2. Example 2

    Input
    47
    
    Expected output
    40.5