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.StringTokenizer;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;

public class cf248b_chilly {

    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter outS = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    static Scanner sc = new Scanner(System.in);

    public static String getString() {
        try {
            return br.readLine();
        } catch (Exception e) {
        }
        return "";
    }

    public static Integer getInt() {
        try {
            return Integer.parseInt(br.readLine());
        } catch (Exception e) {
        }
        return 0;
    }

    public static Integer[] getIntArr() {
        try {
            StringTokenizer temp = new StringTokenizer(br.readLine());
            int n = temp.countTokens();
            Integer temp2[] = new Integer[n];
            for (int i = 0; i < n; i++) {
                temp2[i] = Integer.parseInt(temp.nextToken());
            }
            return temp2;
        } catch (Exception e) {
        }
        return null;
    }

    public static int getMax(Integer[] ar) {
        int t = ar[0];
        for (int i = 0; i < ar.length; i++) {
            if (ar[i] > t) {
                t = ar[i];
            }
        }
        return t;
    }

    public static void print(Object a) {        
        outS.println(a);
    }

    public static int nextInt() {
        return sc.nextInt();
    }

    public static double nextDouble() {
        return sc.nextDouble();
    }

    public static BigInteger getFact(long in) {
        BigInteger ot = new BigInteger("1");
        for (Integer i = 1; i <= in; i++) {
            ot = ot.multiply(new BigInteger(i.toString()));
        }
        return ot;
    }

    public static String gbase(int a, int base) {
        StringBuilder out = new StringBuilder();
        int temp = a;
        while (temp > 0) {
            //out = temp % base + out;
            out.insert(0, temp % base);
            temp /= base;
        }
        return out.toString();
    }

    public static void main(String[] ar) {
        BigInteger out ;
        int input = getInt();

        if (input < 3) {
            print(-1);
            outS.flush();
            return;
        }
        BigInteger temp = new BigInteger("210");
        long start = System.currentTimeMillis();


        BigInteger wanted = new BigInteger("10");
        wanted = wanted.pow(input - 1);
        //print(wanted);

        BigInteger pengali = wanted;

        pengali = wanted.divide(temp);
        BigInteger sisa = wanted.mod(temp);
        //out = wanted;

        if (sisa.compareTo(new BigInteger("0")) > 0) {
            //out = out.add(sisa);
            pengali = pengali.add(new BigInteger("1"));
        }
        // print(pengali);
        out = pengali.multiply(temp);
        //print(System.currentTimeMillis() - start);
        //start = System.currentTimeMillis();
        String o = toString(out);
        //String o = toHexStringUsingCharArray(out.toByteArray());
        //print(o);
        //print("hehe "+ (System.currentTimeMillis() - start));
        //print(powersOfTen);
        //print(out);
        print(o);
        //conv(out);
        
        outS.flush();
    }
    private static void conv(BigInteger bi){
        StringBuilder hi = new StringBuilder('w');
        int pjg = 2;
        while(bi.compareTo(BigInteger.ZERO)>0){            
            hi.setCharAt(pjg,bi.mod(BigInteger.TEN).toString().charAt(0));
            pjg++;
            bi = bi.divide(BigInteger.TEN);
        }
        print(hi);
    }
    public static final String toHexStringUsingCharArray(byte input[]) {
        int i = 0;
        if (input == null || input.length <= 0)
            return null;

        char lookupArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
        char[] result = new char[input.length * 2];
        while (i < input.length) {
            result[2*i] = lookupArray[(input[i]>>4) & 0x0F];
            result[2*i+1] = lookupArray[(input[i] & 0x0F)];
            i++;
        }
        return String.valueOf(result);
    }

    public static String toString(BigInteger bi) {
        StringBuilder sb = new StringBuilder();
        int i = 16;
        while (bi.compareTo(powerOfTen(i)) > 0) {
            i *= 2;
        }
        toString(bi, sb, i);
        int start = 0;
        while (sb.charAt(start) == '0') {
            start++;
        }
        return sb.substring(start);
    }

    private static void toString(BigInteger bi, StringBuilder sb, int digits) {
        if (digits < 32) {
            int start = sb.length();
            for (int i = 0; i < digits; i++) {
                sb.append('0');
            }
            long l = bi.longValue();
            for (int i = digits - 1; i >= 0; i--, l /= 10) {
                sb.setCharAt(start + i, (char) ('0' + l % 10));
            }
        } else {
            int digits2 = digits / 2;
            BigInteger[] parts = bi.divideAndRemainder(powerOfTen(digits2));
            toString(parts[0], sb, digits - digits2);
            toString(parts[1], sb, digits2);
        }
    }
    private static final Map<Integer, BigInteger> powersOfTen = new HashMap<Integer, BigInteger>();

    private static BigInteger powerOfTen(int digits2) {
        BigInteger tens = powersOfTen.get(digits2);
        if (tens == null) {
            powersOfTen.put(digits2, tens = BigInteger.TEN.pow(digits2));
        }
        return tens;
    }
}