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.*;
import java.util.*;
import java.math.*;

// :%s/B248/"name"/
// if (debug) 

public class B248 {
	public static void main(String[] args) { new B248(); }
	FS in = new FS();
	PrintWriter out = new PrintWriter(System.out);

	int t;
	int n;
	BigInteger div = new BigInteger("210");

	boolean debug = !true, multi = !true;

	B248() {
		if (multi) t = in.nextInt();
		do {
			if (multi) if (z(t--)) break;

			n = in.nextInt();
			if (n < 3)
				out.println(-1);
			else {
				BigInteger pow = new BigInteger("1");
				BigInteger ten = new BigInteger("10");
				
				n--;
				pow = pow(ten, n);
				BigInteger mul = pow.divide(div);
				mul = mul.add(BigInteger.ONE);
				out.println((mul.multiply(div)));
			}

		} while (debug || multi);
		out.close();
	}

	BigInteger pow(BigInteger base, int exp) {
		if (z(exp))
			return BigInteger.ONE;
		if (exp == 1)
			return base;
		BigInteger mid = pow(base, exp / 2);
		mid = mid.multiply(mid);
		if (z(exp & 1))
			return mid;
		return mid.multiply(base);
	}

	int min(int a, int b) { if (a < b) return a; return b; }	
	int max(int a, int b) { if (a > b) return a; return b; }	
	long min(long a, long b) { if (a < b) return a; return b; }	
	long max(long a, long b) { if (a > b) return a; return b; }	

	boolean z(int x) { if (x == 0) return true; return false; }	
	boolean z(long x) { if (x == 0) return true; return false; }	

	void sort(int[] arr) {
		int sz = arr.length, j;
		Random r = new Random();
		for (int i = 0; i < sz; i++) {
			j = r.nextInt(sz);
			arr[i] = arr[j]^(arr[i]^(arr[j] = arr[i]));
		} Arrays.sort(arr);
	}

	class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens()) {
				try { st = new StringTokenizer(br.readLine()); }
				catch (Exception e) {}
			} return st.nextToken();
		}
		int nextInt() { return Integer.parseInt(next()); }
		long nextLong() { return Long.parseLong(next()); }
		double nextDouble() { return Double.parseDouble(next()); }
	}
}
