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.util.*;
import java.io.*;
import java.math.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.lang.Integer.*;
import static java.lang.Long.*;

public class Main {
   
    static InputReader in; 
    
    public static void main(String[] args) throws IOException{        
        File file = new File("input.txt");
        if(file.exists()) in = new InputReader(new FileInputStream(file));
        else in = new InputReader(System.in);
       
        int n = in.nextInt();
        int len[] = {2, 2, 3, 2, 3, 3};
        int num[] = {50, 80, 170, 20, 200, 110};
        if(n<3) System.out.println("-1");
        else{
            if(n==3) System.out.println("210"); //mcm
            else{
                System.out.print("1");
                int ind = (n-4)%6;
                for(int i=1; i<(n-len[ind]); i++) System.out.print("0");
                System.out.println(num[ind]);
            }
        }
    }   
   
    static void out(Object ...o){ System.out.println(Arrays.deepToString(o)); }    
    
    static class InputReader {
        
        private BufferedReader reader;
        private StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }
        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        int nextInt(){ return parseInt(next()); }
        long nextLong(){ return parseLong(next()); }
    }
}