Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came up with a few games that were connected with them.

Chilly Willy wants to find the minimum number of length n, such that it is simultaneously divisible by all numbers Willy already knows (2, 3, 5 and 7). Help him with that.

A number's length is the number of digits in its decimal representation without leading zeros.

Input

A single input line contains a single integer n (1 ≤ n ≤ 105).

Output

Print a single integer — the answer to the problem without leading zeroes, or "-1" (without the quotes), if the number that meet the problem condition does not exist.

Examples

Input

1


Output

-1


Input

5


Output

10080
import java.util.*;

/*************************************************************************
 *  219D Codeforce
 * 
 *************************************************************************/
public class Sourcecode {
    //Transpose ArrayLists
    
    
    ///////////////////////////////////////////////////////////////////////////////
    public static void main (String[] args) {
        Scanner input=new Scanner(System.in);
        int digit=input.nextInt();
        if(digit<=2){
            System.out.println("-1");
            return;
        }
        if(digit==3){
            System.out.println("210");
            return;
        }
        if(digit==4){
            System.out.println("1050");
            return;
        }
        
        int[] dp=new int[digit+1];
        dp[3]=21;
        dp[4]=5;
        int result=calculate(dp,digit);
        String resultstring=String.valueOf(result);
        int digitinresult=resultstring.length();
        System.out.print(1);
        for(int i=2;i<digit-digitinresult;i++){
            System.out.print(0);
        }
        System.out.print(resultstring);
        System.out.println(0);
    }

    private static int calculate(int[] dp, int digit) {
        if(digit<=4){
            return dp[digit];
        }
        docalc(dp,digit);
        return dp[digit];
        
    }

    private static int docalc(int[] dp, int digit) {
        if(digit<=4){
            return dp[digit];
        }
        int previous=docalc(dp,digit-1);
        int result=(previous*10)%21;
        dp[digit]=result;
        return result;
        
    }

    
}