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.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;



public class C152P2 {

    private static BufferedReader in;
    private static PrintWriter out;
    private static StringTokenizer input;
    
    public static void main(String[] args) throws IOException {
        //-------------------------------------------------------------------------
        //Initializing...
        new C152P2();
        //-------------------------------------------------------------------------
        //put your code here... :)
        int n = nextInt();
        if(n==1||n==2)
            writeln("-1");
        else if(n==3){
            writeln("210");
        }
        else{
            int [] s = new int[]{1,3,2,6,4,5};
            StringBuilder a = new StringBuilder("1");
            while(a.length()+3!=n)a.append("0");
            switch (s[(n-1)%6]) {
            case 1:
                a.append("020");
                break;
            case 2:
                a.append("110");
                break;
            case 3:
                a.append("200");
                break;
            case 4:
                a.append("080");
                break;
            case 5:
                a.append("170");
                break;
            case 6:
                a.append("050");
                break;
            default:
                break;
            }
            writeln(a.toString());
        }
//          writeln(""+(BigInteger.valueOf(210).multiply(BigInteger.TEN.pow(n-3))));
        //-------------------------------------------------------------------------
        //closing up
        end();
        //--------------------------------------------------------------------------

    }
    public C152P2() throws IOException {
        //Input Output for Console to be used for trying the test samples of the problem 
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        //-------------------------------------------------------------------------
        //Initalize Stringtokenizer input
        input = new StringTokenizer(in.readLine());
    }

    private static int nextInt() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Integer.parseInt(input.nextToken());
    }
    private static long nextLong() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Long.parseLong(input.nextToken());
    }
    private static double nextDouble() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return Double.parseDouble(input.nextToken());
    }
    private static String nextString() throws IOException {
        if (!input.hasMoreTokens())input=new StringTokenizer(in.readLine());
        return input.nextToken();
    }
    private static void write(String output){
        out.write(output);
        out.flush();
    }
    private static void writeln(String output){
        out.write(output+"\n");
        out.flush();
    }
    private static void end() throws IOException{
        in.close();
        out.close();
        System.exit(0);
    }

    

}
