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 class HelloWorld {
    
    InputReader input;
    PrintWriter output;
    
    void run(){
        try {
            output = new PrintWriter(new OutputStreamWriter(System.out));
            input = new InputReader(System.in);
            solve();
            output.flush();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            return;
        }
    }
    
    public static void main(String[] args){
        new HelloWorld().run();
    }

    void solve() {
        int n = input.readInt();
        if(n == 1 || n == 2) {
            output.println("-1");
        }
        else if(n == 3) {
            output.println("210");
        }
        else {
            StringBuffer ans = new StringBuffer();
            int res = 1;
            for(int i = 0 ;i < n - 1; i++) {
                res = (res*10) % 210;
            }
            ans.append("1");
            for(int i = 0; i < n-4;i++) {
                ans.append("0");
            }
            String s = String.format("%03d", 210-res);
            ans.append(s);
            output.println(ans.toString());
        }
    }
    
    class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        public InputReader(InputStream stream) {
            this.stream = stream;
        }
        
        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars)
        {
        curChar = 0;
        try {
            numChars = stream.read(buf);
        } catch (IOException e) {
            throw new InputMismatchException();
        }
        if (numChars <= 0)
        return -1;
        }
        return buf[curChar++];
        }
        
        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
            c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do
            {
                if (c < '0' || c > '9')
                throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        
        public String readString() {
            int c = read();
            while (isSpaceChar(c))
            c = read();
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        
        public Long readLong() {
            return Long.parseLong(readString());
        }
        
        public Double readDouble() {
            return Double.parseDouble(readString());
        }
        
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
    } 
    
}
