10571057 SUSTech Online Judge
Problem 1057 --A math problem

1057: A math problem

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 84  Solved: 39
[Submit][Status][Web Board]

Description

F(x) = 5x11+11x5+kax, with (0 <= k <= 10000, 0 <= a). Now give you k, please find the smallest a such that for any positive integer x, F(x) % 55 = 0.

Input

Only one line with an integer k.

Output

If no such a exists, print -1, otherwise print the value of a.

Sample Input

3

Sample Output

13

HINT

Source

[Submit][Status]