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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class B248 {

	public static BufferedReader read = null;
	public static PrintWriter out = null;
	public static StringTokenizer token = null;

	public static void solve() throws IOException {
		int n = nint();
		BigInteger b1 = new BigInteger(""+10), b2 = b1.pow(n-1),
				b3 = new BigInteger("+1"), b4 = new BigInteger(""+210), i = b2;
		if(n < 3) out.println(-1);
		else {
			i = i.divide(b4);
			i = i.multiply(b4);
			i = i.add(b4);
			out.println(i);
		}
		
	}
	
	public static String next() {
		while(token == null || !token.hasMoreTokens()) {
			try {
				token = new StringTokenizer(read.readLine());
			} catch(IOException e) {
				e.printStackTrace();
			}
		}
		return token.nextToken();
	}

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

	public static long nlong() {
		return Long.parseLong(next());
	}

	public static double ndouble() {
		return Double.parseDouble(next());
	}

	public static int[] narr(int n) {
		int[] a = new int[n];
		for(int i = 0; i < n; i++) a[i] = nint();
		return a;
	}

	public static long[] nla(int n) {
		long[] a = new long[n];
		for(int i = 0; i < n;i ++) a[i] = nlong();
		return a;
	}

	public static String[] nstra(int n) {
		String[] str = new String[n];
		for(int i = 0; i < n; i++) {
			str[i] = next();
		}
		return str;
	}

	public static void main(String[] args) {
		try {
			read = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			solve();
			out.flush();
			out.close();
		} catch(IOException e) {
			e.printStackTrace();
		}
	}
}
