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.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;


public class B {

	public static void main(String[] args) throws IOException 
	{
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int n = sc.nextInt();
		int[][] p = new int[210][n + 1];
		for(int i = 0; i < 210; ++i)
			Arrays.fill(p[i], -1);
		p[0][0] = 0;
		for(int len = 1; len <= n; ++len)
			for(int m = 0; m < 210; ++m)
				for(int d = 0; d < 10; ++d)
					if((len < n || d != 0) && p[(m * 10 + d)%210][len - 1] != -1)
					{	
						p[m][len] = d;
						break;
					}
		StringBuilder ans = new StringBuilder();
		if(p[0][n] == -1)
			out.println(-1);
		else
		{
			int m = 0, len = n;
			while(len > 0)
			{
				ans.append(p[m][len]);
				m = (m * 10 + p[m][len])%210;
				--len;
			}
			out.println(ans);
		}
		out.flush();
		out.close();
	}

	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public Scanner(FileReader r){	br = new BufferedReader(r);}

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

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

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

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

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

		public boolean ready() throws IOException {return br.ready();}


	}
}