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.FileReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Locale;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class Problem implements Runnable {
    
    int MOD = 2 * 5 * 3 * 7;
    
    String getAnsStupid(int n) {
        int k = (int)(Math.pow(10, n) + 0.1);
        for (; k % MOD != 0; k++);
        return String.valueOf(k);
    }
    
    String build(String s, int n) {
        String l = s.substring(0, s.length() - 3);
        String r = s.substring(s.length() - 3, s.length());
        int k = n - s.length();
        char[] buffer = new char[k];
        for (int i = 0; i < k; i++)
            buffer[i] = '0';
        return l.concat(new String(buffer)).concat(r);
    }
    
    int solve() throws Throwable {
        int n = nextInt();
        String[] ans = new String[Math.max(10, n + 1)];
        ans[0] = ans[1] = ans[2] = "-1";
        for (int i = 3; i <= 9; i++)
            ans[i] = getAnsStupid(i - 1);
        if (n <= 8)
            out.print(ans[n]);
        else
            for (int i = 9; i >= 3; i--) {
                if ((n - i) % 6 == 0) {
                    out.println(build(ans[i], n));
                    return 0;
                }
            }
        return 0;
    }
    
    public static void main(String[] args) {
        new Problem().run();
    }
    
    final int USE_FILES = 1;
    final int USE_STDIO = 0;
    final int DEFAULT = -1;
    int IO_MODE = DEFAULT;
    
    BufferedReader br;
    PrintWriter out;
    StringTokenizer in;
    
    public String nextToken() throws Throwable {
        while (in == null || !in.hasMoreTokens())
            in = new StringTokenizer(br.readLine());
        return in.nextToken();
    }
    
    public int nextInt() throws Throwable {
        return Integer.parseInt(nextToken());
    }
    
    public long nextLong() throws Throwable {
        return Long.parseLong(nextToken());
    }
    
    public double nextDouble() throws Throwable {
        return Double.parseDouble(nextToken());
    }
    
    public void run() {
        boolean ONLINE_JUDGE = false;
        try {
            long startTime = System.currentTimeMillis();
            
            try {
                ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
                Locale.setDefault(Locale.US);       
            } catch (Throwable t) {
                System.err.println("Operation is forbidden");
            }
            
            if (IO_MODE == USE_FILES || (IO_MODE == DEFAULT && !ONLINE_JUDGE)) {
                br = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            } else {
                br = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            }
            
            int ret = solve();
            br.close();
            out.close();
            
            long endTime = System.currentTimeMillis();
            long freeMemory = Runtime.getRuntime().freeMemory();
            long totalMemory = Runtime.getRuntime().totalMemory();
            
            System.err.printf("Time = %.3f s\n", (endTime - startTime) / 1000.0);
            System.err.printf("Memory = %.3f MB\n", (totalMemory - freeMemory) / (float)(1 << 20));
            
            if (ret != 0)
                System.exit(ret);
            
        } catch (Throwable t) {
            t.printStackTrace(ONLINE_JUDGE ? System.out : System.err);
            System.exit(-1);
        }
    }
}