Please give the hint ..!

Prime Number
You have given only these prime numbers
2
,
3
,
5
and
7
. You have to find the minimum number of length
N
, such that it is simultaneously divisible by all given prime numbers (
2
,
3

5
and
7
). A number’s length is the number of digits in its decimal representation without leading zeros.

Input Format
A single input line contains a single integer
N
.

Output Format
Print a single integer — the answer to the problem without leading zeroes, or “-1” (without the quotes), if the number that meets the problem condition does not exist.

Constraints
1
≤
N
≤
10
6

Time Limit
1 second

Examples
Input1
2

Output1
-1

Input2
6

Output2
100170

@sonu28sharma99
The first thing to realize is that any number that is divisible by such a number has to be of the form 2*3*5*7*M = 210 * M, for some M∈ N. Therefore, such numbers are of the form: 210*1, 210*2, 210*3, 210*4, and so on.

so for n=6
k= (10^5)%210 =40.
ans= (10^5)+210-40 = 100170

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.