Lotto#617

Lotto

1 second
64 megabytes
Easy

Megasoft has organized a TV quiz. A natural number appears on the scoreboard. Each participant must append one or more digits to the right of this number so that the resulting number is prime. Participants then send the resulting number by SMS to the studio. Initially, the participant who sends their number first would win the corresponding amount. However, the owner of Megasoft, Gill Bates, decided to change the rules. Now, the prize is awarded to the participant who first sends the smallest possible number. Your task is to help Gill Bates determine the prize amount according to the new rules.

Input

The program reads a natural number from the input, which does not exceed .

Output

Print the smallest number that can be obtained according to the new quiz rules, i.e., the amount Gill Bates has to pay.

Examples

Example 1

Loading
Loading