100 geese#2969

100 geese

1 second
64 megabytes
Very easy

Let's recall an old arithmetic problem.

A flock of geese was flying when a lone goose met them. "Greetings, geese," said the goose. The leader of the flock replied: "There are not of us. If our number were doubled, then increased by half, then by a quarter, and finally, with you joining us, we would be . How many geese are in the flock?"

You probably know the answer: there were 36 geese. Let's make the problem a bit more complicated.

A flock of geese was flying, and a lone goose approached them. "Greetings, geese," said the goose. The leader of the flock replied: "There are not of us. If our number were doubled, then increased by half, then by a quarter, and with you, goose, joining us, then there would be ." You are given a natural number . You need to answer: how many geese are in the flock?

Input

The input contains a single natural number (1 \leq N \leq 2 \cdot 10^9).

Output

If for the given it is possible to find a positive integer number of geese in the flock, output this number. Otherwise, output -1.

Examples

Example 1

Loading
Loading