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.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class Main{
    
    static class FastScanner{
        StringTokenizer st;
        BufferedReader s;
        
        public FastScanner() throws IOException{
            s = new BufferedReader(new InputStreamReader(System.in));
            st = new StringTokenizer("");
        }
        
        public FastScanner(File f) throws FileNotFoundException{
            s = new BufferedReader(new FileReader(f));
            st = new StringTokenizer("");
        }

        
        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }
        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }
        }
    }
   
  
    public static void main(String[] args) throws IOException, InterruptedException{
       FastScanner s = new FastScanner();
       PrintWriter ww = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
       String ans[]=new String[10];
       ans[4]="050";
       ans[5]="0080";
       ans[6]="00170";
       ans[7]="000020";
       ans[8]="0000200";
       ans[9]="00000110";
       int n=s.nextInt();
       if(n==1||n==2)
           ww.println("-1");
       else if(n==3)
           ww.println("210");
       else 
       {
           if(n<10)
               ww.println("1"+""+ans[n]);
           else
           {
               int count=0;
               while(n>9)
               {
                   n-=6;
                   count++;
                   
               }
               String str=ans[n];
               ww.print("1");
               for(int i=1;i<=count;i++)
                   ww.print("000000");
               ww.print(str);
           }
       }
       ww.close();        
      
           }
       }
        