CSES - KILO 2015 5/5 - Conjecture
  • Time limit: 1.00 s
  • Memory limit: 128 MB

Uolevi proposed the following conjecture:

Every positive integer that can be written as a sum of three distinct positive integers can be written as a sum of three equal positive integers.

To prove Uolevi wrong, Maija asked you to write a program to produce counterexamples for the conjecture.

In particular, given integer nn, your program has to output the smallest positive integer that is larger than nn and can be written as a sum of three distinct positive integers but can't be written as a sum of three equal positive integers.

Input

The only input line contains a single integer nn.

Output

Output the smallest counterexample larger than nn.

Constraints

  • 0n1070 \le n \le 10^7

Example

Input:

8

Output:

10

Explanation: Number 1010 can be written as 2+3+5=102+3+5=10, but there is no positive integer xx such that x+x+x=10x+x+x=10.