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.math.BigInteger;
import java.util.*;
import java.awt.geom.*;
public class Main {
    
    private void doitC(){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int y1 = sc.nextInt();
            int y2 = sc.nextInt();
            int yw = sc.nextInt();
            int xb = sc.nextInt();
            int yb = sc.nextInt();
            int r = sc.nextInt();
            
            int yy = yw + (yw - y2);
            int yyy = yw + (yw - y1);
            
            double left = 0.0, right = xb;
            double mid = 0.0;
            boolean flg = false;
            while(left < right){
                mid = (right + left) / 2;
                double a = (yw - yb) / (mid - xb);
                double b = yb - a * xb;
                System.out.println("mid = " + mid + " a =" + a + " b = " + b );
                if(yy + r < b && b < yyy - r){
                    System.out.println(mid);
                    flg = true;
                    break;
                }
                else if(yy + r < b){
                    left = mid + 1;
                }
                else{
                    right = mid;
                }
            }
            if(! flg){
                System.out.println(-1);
            }
        }
    }
    
    private void doit(){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            if(n <= 2){
                System.out.println(-1);
                continue;
            }
            else if(n == 3){
                System.out.println(210);
                continue;
            }
            StringBuilder sb = new StringBuilder("1");
            for(int i = 0 ; i < n-1; i++){
                sb.append(0);
            }
            BigInteger bi = new BigInteger(sb.toString());
            BigInteger div = new BigInteger("210");
            BigInteger zero = BigInteger.ZERO;
            BigInteger one = BigInteger.ONE;
            int count = 0;
            for(int i = 0 ; i < 210; i++){
                if(bi.mod(div).equals(zero)){
                    //System.out.println(bi.toString());
                    break;
                }
                bi = bi.add(one);
                count++;
                //System.out.println("lloop = " + bi.toString());
            }
            String c = (count + "");
            int len = c.length();
            for(int i = 0; i < len; i++){
                sb.setCharAt(n+i-len, c.charAt(i));
            }
            System.out.println(sb.toString());
            //System.out.println(count);
        }
    }
    
    private void doitA(){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            int [] data = new int[n];
            int [] data2 = new int[n];
            for(int i = 0 ; i < n; i++){
                data[i] = sc.nextInt();
                data2[i] = sc.nextInt();
            }
            
            int min = 1 << 24;
            for(int i = 0 ; i < 2; i++){
                for(int j = 0 ; j < 2; j++){
                    int count = 0;
                    for(int k = 0 ; k < n; k++){
                        if(data[k] != i){
                            count++;
                        }
                        if(data2[k] != j){
                            count++;
                        }
                    }
                    min = Math.min(min, count);
                }
            }
            System.out.println(min);

        }
    }

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