Clock angles X57878


Statement
 

pdf   zip

html

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

Input

The input consists of a single integer m, with 0 ≤ m ≤ 10080. It is guaranteed that m 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