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.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.TreeSet;

public class B {

    public static void main(String[] Args) {
        new B().solve();
    }

    void solve() {
        int n = si();
        if (n < 3) {
            System.out.println("-1");
            return;
        }
        if (n == 3) {
            System.out.println("210");
            return;
        }
        if (n==4){
            System.out.println("1050");
            return;
        }
        String ss = "";
        int[] w = { 1, 3, 2, 6, 4, 5 };
        int d = w[(n - 1) % w.length];

        TreeSet<String> set = new TreeSet<String>();
        for (int i = 0; i < 10; i++)
            for (int j = 0; j < 10; j++)
                for (int k = 0; k < 10; k++) {
                    int z = 3 * k + 2 * j + 6 * i + d;
                    int h = k + j + i + 1;
                    if (z % 7 == 0 && h % 3 == 0) {
                        ss = i + "" + j + "" + k;
                        set.add(ss);
                    }
                }
        ss = set.first() + "0";
        StringBuilder b = new StringBuilder(ss);
        b=b.reverse();
        while (b.length() < n - 1) b.append("0");
        b=b.reverse();
        System.out.println("1" + b);

    }

    // ----------------------- Library ------------------------
    static void pai(int[] a) {
        System.out.println(Arrays.toString(a));
    }

    static int toi(Object s) {
        return Integer.parseInt(s.toString());
    }

    void sleep() {
        try {
            Thread.sleep(1000);
        } catch (Exception e) {
            // TODO: handle exception
        }
    }

    static int[] dx_ = { 0, 0, 1, -1 };
    static int[] dy_ = { 1, -1, 0, 0 };

    static int[] dx3 = { 1, -1, 0, 0, 0, 0 };
    static int[] dy3 = { 0, 0, 1, -1, 0, 0 };
    static int[] dz3 = { 0, 0, 0, 0, 1, -1 };

    static int[] dx = { 1, 0, -1, 1, -1, 1, 0, -1 }, dy = { 1, 1, 1, 0, 0, -1,
            -1, -1 };
    static Scanner scan = new Scanner(System.in);
    static int INF = 2147483647;

    // finds GCD of a and b using Euclidian algorithm
    public int GCD(int a, int b) {
        if (b == 0)
            return a;
        return GCD(b, a % b);
    }

    static List<String> toList(String[] a) {
        return Arrays.asList(a);
    }

    static String[] toArray(List<String> a) {
        String[] o = new String[a.size()];
        a.toArray(o);
        return o;
    }

    static int[] pair(int... a) {
        return a;
    }

    static int si() {
        return scan.nextInt();
    }

    static String ss() {
        return scan.next();
    }

    static int[] sai(int n) {
        int[] a = new int[n];
        for (int i = 0; i < a.length; i++)
            a[i] = si();

        return a;
    }

    static int[] sai_(int n) {
        int[] a = new int[n + 1];
        for (int i = 1; i <= n; i++)
            a[i] = si();

        return a;
    }

    static String[] sas(int n) {
        String[] a = new String[n];
        for (int i = 0; i < a.length; i++)
            a[i] = ss();
        return a;
    }

    static Object[][] _sm1(int r, int c) {
        Object[][] a = new Object[r][c];
        for (int i = 0; i < r; i++)
            for (int j = 0; j < c; j++)
                a[i][j] = scan.next();
        return a;
    }

    static Object[][] _sm2(int r) {
        Object[][] a = new Object[r][3];
        for (int i = 0; i < r; i++)
            a[i] = new Object[] { ss(), ss(), ss() };
        return a;
    }
}