Clock angles X57878


Statement
 

pdf   zip

It is noon and Jordi notices that the hour and minute hands are overlapping. Jordi has to leave in mm minutes. What angle will the two hands form when he leaves?

Input

The input consists of a single integer mm, with 0m100800 \leq m \leq 10080. It is guaranteed that mm is a multiple of 30.

Output

Write an integer, the angle formed by the two hands in degrees.

Public test cases
  • Input

    0
    30
    60
    180
    540
    10080
    

    Output

    0
    165
    30
    90
    90
    0
    
  • Information
    Author
    Víctor Martín
    Language
    English
    Translator
    Alex Alvarez
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Python
    User solutions
    C++ Python