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

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.*;
import java.math.*;
import java.io.*;

/**
 *
 * @author Magzhan
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        try {

            Scanner in = new Scanner(System.in);

            int n=in.nextInt();
            BigInteger sv=BigInteger.valueOf(7);
            BigInteger tr=BigInteger.valueOf(7);
            
            if(n==1 || n==2){
                System.out.println("-1");
            }else{
                if(n==3){
                    System.out.println("210");
                }else{
                    int p=0;
                    if(n%3==0){
                        p=n/3;
                    }else{
                        p=(int)(n/3)+1;
                    }
                    int q=n%3;
                    int s=0;
                    if(q==0){
                        s=100;
                    }
                    if(q==1){
                        s=1;
                    }
                    if(q==2){
                        s=10;
                    }
                    if(p%2==0){
                        //substract
                        for(int i=0;i<210;i+=10){
                            if((i-s)%7==0 && (i+1)%3==0){
                                System.out.print("1");
                                for(int j=0;j<n-4;j++){
                                    System.out.print("0");
                                }
                                if(i<100){
                                    System.out.print("0" + i);
                                }else if (i<10) {
                                    System.out.print("00"+i);
                                }else{
                                    System.out.print(i);
                                }
                                break;
                            }
                        }
                    }else{
                        //add
                        for(int i=0;i<210;i+=10){
                            if((i+s)%7==0 && (i+1)%3==0){
                                System.out.print("1");
                                for(int j=0;j<n-4;j++){
                                    System.out.print("0");
                                }
                                if(i<100){
                                    System.out.print("0" + i);
                                }else if (i<10) {
                                    System.out.print("00"+i);
                                }else{
                                    System.out.print(i);
                                }
                                break;
                            }
                        }
                    }
                }
            }
            
        } catch(Exception e) {
            System.out.println(e.toString());
        }
    }

}