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

// Alfonso2 Peterssen (mukel)
import java.io.*;
import java.math.*;
import java.util.*;

public class Testing implements Runnable {

	void solve() throws IOException {
		
		final int LCM = 2 * 3 * 5 * 7;
		
		int n = nextInt();
		
		if (n == 1 || n == 2)
		{
			writer.println(-1);
			return ;
		}
		
		if (n == 3)
		{
			writer.println(210);
			return ;
		}
		
		int mod = 1;
		for (int i = 0; i < n - 1; ++i)
			mod = (mod * 10) % LCM;
		
		writer.print(1);
		for (int i = 0; i < n - 4; ++i)
			writer.print(0);
		writer.printf("%03d\n", LCM - mod);
	}
	
	public static void main(String[] args) {
		new Testing().run();
	}
	
	PrintWriter writer;
	BufferedReader reader;	
	StringTokenizer tokenizer;

	public void run() {
		try {	
			reader = new BufferedReader(new InputStreamReader(System.in));
			writer = new PrintWriter(System.out);
			solve();
			reader.close();
			writer.close();	 
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(-1);
		}		
	}
	
	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreElements()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.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());
	}
	
	BigInteger nextBigInteger() throws IOException {
		return new BigInteger(nextToken());
	}	
}
