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 static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {
		}
		new Main().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	int binPow (int x, int deg, int mod) {
		int ret = 1;
		while (deg > 0) {
			if ((deg & 1) == 1)
				ret *= x;
			x *= x;
			ret %= mod;
			x %= mod;
			deg >>= 1;
		}
		return ret;
	}
	
	private void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		
		int n = nextInt();
		if (n < 3) {
			out.println(-1);
		}
		else if (n == 3) {
			out.println(210);
		}
		else {
			int mods[] = {2, 3, 5, 7};
			int remainders[] = new int[4];
			for (int i = 0; i < 4; i++)
				remainders[i] = binPow(10, n - 1, mods[i]);
			
			for (int j = 0; ; j++) {
				boolean ok = true;
				for (int i = 0; i < 4; i++) {
					if ((j % mods[i] + remainders[i]) % mods[i] != 0)
						ok = false;
				}
				
				if (ok) {
					StringBuilder ans = new StringBuilder();
					String tail = Integer.toString(j);
					int l = tail.length();
					ans.append(1);
					for (int i = 0; i < n - 1 - l; i++) {
						ans.append(0);
					}
					ans.append(tail);
					out.println(ans);
					break;
				}
				
			}
		}
		in.close();
		out.close();
	}

	void chk(boolean b) {
		if (b)
			return;
		System.out.println(new Error().getStackTrace()[1]);
		exit(999);
	}
	void deb(String fmt, Object... args) {
		System.out.printf(Locale.US, fmt + "%n", args);
	}
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}
