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.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Duy Hung
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.nextInt();
        if (n <= 2) {
            out.printLn(-1);
            return;
        }

        if (n == 3) {
            out.printLn(210);
            return;
        }

        int mod2 = 1, mod3 = 1, mod5 = 1, mod7 = 1;
        for (int i = 0; i < n - 1; ++i) {
            mod2 = (mod2 * 10) % 2;
            mod3 = (mod3 * 10) % 3;
            mod5 = (mod5 * 10) % 5;
            mod7 = (mod7 * 10) % 7;
        }

        int num = 0;
        while (mod2 != 0 || mod3 != 0 || mod5 != 0 || mod7 != 0) {
            num++;
            mod2 = (mod2 + 1) % 2;
            mod3 = (mod3 + 1) % 3;
            mod5 = (mod5 + 1) % 5;
            mod7 = (mod7 + 1) % 7;
        }

        int len = n - 1, temp = num;
        while (temp > 0) {
            len--;
            temp /= 10;
        }

        out.print(1);
        for (int i = 0; i < len; ++i) out.print(0);
        out.print(num);
	}
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLn(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }
}

