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.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class B248 {
    
    static StringTokenizer st;
    static BufferedReader in;
    static PrintWriter pw;
    
    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int n = nextInt();
        int[]q1 = new int[211];
        int tail1 = 1, tail2 = 0;
        q1[1] = 0;
        boolean[]used = new boolean[210];
        int[]q2 = new int[211];
        int[][]p_mod = new int[210][n+1];
        for (int i = 0; i < 210; i++) {
            p_mod[i][n] = -1;
        }
        int[]m = new int[10000];
        for (int i = 0; i < m.length; i++) {
            m[i] = i % 210;
        }
        for (int i = 0; i < n; i++) {
            Arrays.fill(used, false);
            tail2 = 0;
            int begin = 0;
            if (i==0)
                begin = 1;
            for (int j = 1; j <= tail1; j++) {
                for (int j2 = begin; j2 <= 9; j2++) {
                    int mod = m[q1[j]*10+j2];
                    if (!used[mod]) {
                        used[mod] = true;
                        q2[++tail2] = mod;
                        p_mod[mod][i+1] = q1[j];
                    }
                }
            }
            tail1 = tail2;
            for (int j = 1; j <= tail1; j++) {
                q1[j] = q2[j];
            }
        }
        if (p_mod[0][n]==-1)
            pw.println(-1);
        else {
            int[]ans = new int[n+1];
            int curmod = 0, prevpod = 0;
            for (int i = n; i >= 1; i--) {
                prevpod = p_mod[curmod][i];
                ans[i] = ((curmod-10*prevpod) % 210+210) % 210;
                curmod = p_mod[curmod][i];
            }
            for (int i = 1; i <= n; i++) {
                pw.print(ans[i]);
            }
            pw.println();
        }
        pw.close();
    }
    private static int nextInt() throws IOException{
        return Integer.parseInt(next());
    }
    
    private static long nextLong() throws IOException{
        return Long.parseLong(next());
    }
    
    private static double nextDouble() throws IOException{
        return Double.parseDouble(next());
    }
    
    private static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
}
