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
//package com.example.programmingpractice;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

public class CodeforcesNT {

    static String[] sTakeInputs;
    static int sIntInputPos = 0;
    static int sLongInputPos = 0;
    static BufferedReader sBufferedReader;

    static int[] scanIntArray() throws Exception{
        String[] inputs = sBufferedReader.readLine().trim().split(" ");
        int[] arr = new int[inputs.length];
        for(int i = 0; i<inputs.length; i++) arr[i] = Integer.parseInt(inputs[i]);
        return arr;
    }

    static long[] scanLongArray() throws Exception{
        String[] inputs = sBufferedReader.readLine().trim().split(" ");
        long[] arr = new long[inputs.length];
        for(int i = 0; i<inputs.length; i++) arr[i] = Long.parseLong(inputs[i]);
        return arr;
    }

    static int scanInt() throws Exception{
        return Integer.parseInt(sBufferedReader.readLine().trim());
    }

    static long scanLong() throws Exception{
        return Long.parseLong(sBufferedReader.readLine().trim());
    }

    static int nextInt() throws Exception {
        if(sIntInputPos == 0) sTakeInputs = sBufferedReader.readLine().trim().split(" ");
        if(sTakeInputs.length <= sIntInputPos) {
            System.out.println("Warning input limit exceeded!!!"); return 0;
        }
        return Integer.parseInt(sTakeInputs[sIntInputPos++]);
    }



    static long nextLong() throws Exception {
        if(sLongInputPos == 0) sTakeInputs = sBufferedReader.readLine().trim().split(" ");
        if(sTakeInputs.length <= sLongInputPos) {
            System.out.println("Warning input limit exceeded!!!"); return 0;
        }
        return Long.parseLong(sTakeInputs[sLongInputPos++]);
    }

    static int gcd(int a, int b) {
        if(a%b == 0) return b;
        return gcd(b, a%b);
    }

    static ArrayList<Integer> getPrimes(boolean[] checker) {
        checker[0] = checker[1] = true;
        for(int i = 2; i*i<=checker.length; i++) {
            for(int j = 2; i*j<checker.length; j++) checker[i*j] = true;
        }
        ArrayList<Integer> primes = new ArrayList<>();
        for(int i = 2; i<checker.length; i++) {
            if(!checker[i]) primes.add(i);
        }
        return primes;
    }



    public static void main (String[] args) throws Exception {
        sBufferedReader = new BufferedReader(new InputStreamReader(System.in));

        int n = nextInt();
        if(n<3) {System.out.println("-1"); return;}
        if(n == 3) {System.out.println("210"); return;}
        int m = 1;
        for(int i = 1; i<n; i++) {
            m *= 10;
            m %= 210;
        }
        m = 210 - m;
        String last = ""+m;
        StringBuilder sb = new StringBuilder();
        sb.append('1');
        int len = n-last.length()-1;
        for(int i = 0; i<len; i++) sb.append('0');
        sb.append(last);
        System.out.println(sb);

    }
}
