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

public class P248B {

  @SuppressWarnings("unchecked")
  public void run() throws Exception {
    int n = nextInt();
    if (n < 3) {
      println(-1);
      return;
    }
    if (n == 3) {
      println("210");
      return;
    }

    String [] adds = {"110", "050", "080", "170", "020", "200"};
  
    print("1");
    for (int i = 0; i < n - 4; i++) print("0");
    println(adds[(n - 3) % 6]);
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P248B().run();
    br.close();
    pw.close();
  }

  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) {
        return null;
      }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) {
    print("" + b);
  }

  void print(int i) {
    print("" + i);
  }

  void print(long l) {
    print("" + l);
  }

  void print(double d) {
    print("" + d);
  }

  void print(char c) {
    print("" + c);
  }

  void print(Object o) {
    if (o instanceof int[]) {
      print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) {
      print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) {
      print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) {
      print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) {
      print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) {
      print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) {
      print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) {
      print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) {
      print(Arrays.toString((Object [])o));
    } else {
      println("" + o);
    }
  }

  void print(String s) {
    pw.print(s);
  }

  void println(byte b) {
    println("" + b);
  }

  void println(int i) {
    println("" + i);
  }

  void println(long l) {
    println("" + l);
  }

  void println(double d) {
    println("" + d);
  }

  void println(char c) {
    println("" + c);
  }

  void println(Object o) {
    print(o);
    println("");
  }

  void println(String s) {
    pw.println(s);
  }

  int nextInt() throws IOException {
    return Integer.parseInt(nextToken());
  }

  long nextLong() throws IOException {
    return Long.parseLong(nextToken());
  }

  double nextDouble() throws IOException {
    return Double.parseDouble(nextToken());
  }

  char nextChar() throws IOException {
    return (char) (br.read());
  }

  String next() throws IOException {
    return nextToken();
  }

  String nextLine() throws IOException {
    return br.readLine();
  }

  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) {
      array[i] = nextInt();
    }
    return array;
  }

  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) {
      array[i] = nextLong();
    }
    return array;
  }

  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) {
      array[i] = nextDouble();
    }
    return array;
  }

}