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

import static java.lang.Math.*;

/*
	3 : 210
	4 : 050
	5 : 080
	6 : 170
	7 : 020
	8 : 200
	9 : 110
 */


public class Main {
	void solve() throws Exception {
		int n = in.nextInt();
		if (n < 3){
			out.println(-1);
			return;
		}
		if (n == 3){
			out.println(210);
			return;
		}
		out.print(1);
		for (int i=1; i<n-3; i++)
			out.print(0);
		String t = "";
		switch ((n - 3) % 6){
		case 0 : t = "110"; break;
		case 1 : t = "050"; break;
		case 2 : t = "080"; break;
		case 3 : t = "170"; break;
		case 4 : t = "020"; break;
		case 5 : t = "200"; break;
		}
		out.println(t);
	}

	FastScanner in;
	PrintWriter out;

	String input = "";
	String output = "";

	void run() {
		try {
			if (input.length() > 0) {
				in = new FastScanner(new BufferedReader(new FileReader(input)));
			} else
				in = new FastScanner(new BufferedReader(new InputStreamReader(
						System.in)));
			if (output.length() > 0)
				out = new PrintWriter(new FileWriter(output));
			else
				out = new PrintWriter(System.out);

			solve();

			out.flush();
			out.close();
		} catch (Exception ex) {
			ex.printStackTrace();
			out.flush();
			out.close();
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}

	class FastScanner {
		BufferedReader bf;
		StringTokenizer st;

		public FastScanner(BufferedReader bf) {
			this.bf = bf;
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(bf.readLine());
			return st.nextToken();
		}

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

		public String nextLine() throws IOException {
			return bf.readLine();
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public int[] readIntArray(int n) throws IOException {
			int[] array = new int[n];
			for (int i = 0; i < n; i++)
				array[i] = this.nextInt();
			return array;
		}

		public long[] readLongArray(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++)
				array[i] = this.nextLong();
			return array;
		}

	}

}

 	 	      	 	  	    	  	  	