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.*;
public final class chilly_willy
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static int[][][][][] dp;
	static int maxn=(int)(1e5)+2,n;
	static int[] min;
	
	static int solve(int m1,int m2,int m3,int m4,int idx)
	{
		if(idx>n)
		{
			return (m1==m2 && m2==m3 && m3==m4 && m4==0)?1:0;
		}
		if(dp[m1][m2][m3][m4][idx]!=-1)
		{
			return (dp[m1][m2][m3][m4][idx]);
		}
		else
		{
			int start=(idx==1)?1:0,now=0;
			for(int i=start;i<=9;i++)
			{
				int val1=(((m1*10)%2)+i)%2,val2=(((m2*10)%3)+i)%3,val3=(((m3*10)%5)+i)%5,val4=(((m4*10)%7)+i)%7,curr=solve(val1,val2,val3,val4,idx+1);
				if(curr==1)
				{
					min[idx]=i;now=1;break;
				}
			}
			dp[m1][m2][m3][m4][idx]=now;return dp[m1][m2][m3][m4][idx];
		}
	}
	
	public static void main(String args[]) throws Exception
	{
		n=sc.nextInt();dp=new int[2][3][5][7][maxn];min=new int[maxn];Arrays.fill(min,Integer.MAX_VALUE);
		for(int i=0;i<2;i++)
		{
			for(int j=0;j<3;j++)
			{
				for(int k=0;k<5;k++)
				{
					for(int x=0;x<7;x++)
					{
						for(int y=0;y<maxn;y++)
						{
							dp[i][j][k][x][y]=-1;
						}
					}
				}
			}
		}
		if(solve(0,0,0,0,1)==1)
		{
			for(int i=1;i<=n;i++)
			{
				out.print(min[i]);
			}
			out.println("");
		}
		else
		{
			out.println(-1);
		}
		out.close();
	}
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}