## Problem Description

Give you a positive integer N, you task is to find a minimum positive integer
M such that the result of N * M only contains “1” and “0” and N * M > 1.
## Input

There are multiple test cases. For each test case, there is an integer N(1<=N<=5000).
## Output

For each test case, you should output the minimum positive integer M such that the result of N * M only contains “1” and “0”.
## Sample Input

3

## Sample Output

37

## Source

FZU 2008 Summer Training III--Number Theory