-9. Score of an Integer

I'm a slow walker, but I never walk backwards.

題目來源:judgegirl from ntu prof. pangfeng Liu

Task Description

Write a program to compute a score for an integer . If is zero or negative, the score is . Otherwise, we start with . If the is a multiple of 3, add 3 to the score. After that, if is a multiple of , add to the score. After that if is between and (inclusive), add to the score, else subtract from the score. Now print the score.

Input Format

There is one line in the input. The line has the integer .

Output Format

There is one line in the output. The line has a score of .

Sample Input

-10

Sample Output

-100

Sample Input

15

Sample Output

-42

Submit

Login

Testdata Set

Download Testdata