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
#include <bits/stdc++.h>
using namespace std;
const double pi = 2 * acos(0.0);
const int inf = 0x3f3f3f3f;
const double infd = 1.0 / 0.0;
long long power(long long x, long long y, long long MOD) {
  long long res = 1;
  x = x % MOD;
  while (y > 0) {
    if (y & 1) res = (res * x) % MOD;
    y = y >> 1;
    x = (x * x) % MOD;
  }
  return res;
}
long long mul(long long a, long long b, long long MOD) {
  if (b == 1) {
    return a;
  }
  if (b % 2 == 0) {
    return 2 * (mul(a, b / 2, MOD) % MOD);
  } else {
    return (a + (2 * (mul(a, b / 2, MOD)) % MOD)) % MOD;
  }
}
bool ispow2(long long n) {
  if (((n & (n - 1)) == 0) && n != 0) {
    return true;
  }
  return false;
}
bool prime(int x) {
  if (x == 1) {
    return false;
  }
  if (x == 2) {
    return true;
  }
  if (x % 2 == 0) {
    return false;
  }
  for (int i = 3; i * i <= x; i += 2) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
int __gcd(int a, int b) {
  if (b == 0) return a;
  return __gcd(b, a % b);
}
int coprime(int a, int b) {
  if (a == b) return 0;
  if (prime(a) && prime(b)) return 1;
  if ((a == 2 && b % 2 != 0) || (b == 2 && a % 2 != 0)) return 1;
  if ((a % 2 != 0 && prime(b) && a < b) || (b % 2 != 0 && prime(a) && a > b))
    return 1;
  if (abs(a - b) == 1) return 1;
  if (a == 1 || b == 1) return 1;
  return __gcd(a, b);
}
unsigned long long lcm(unsigned a, unsigned b) {
  return ((unsigned long long)a) * (b / __gcd(a, b));
}
bool fun(string s, int d) {
  int rem = 0;
  for (int i = 0; i < s.size(); i++) {
    rem *= 10;
    rem = (rem + (s[i] - '0')) % d;
  }
  return !rem;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  if (n < 3) {
    cout << -1 << endl;
    return 0;
  }
  if (n == 3) {
    cout << 210 << endl;
    return 0;
  }
  string s = "1";
  for (int i = 1; i < n; i++) {
    s += '0';
  }
  for (int i = 0; i <= 2; i++) {
    for (int j = 0; j <= 9; j++) {
      s[n - 3] = '0' + i;
      s[n - 2] = '0' + j;
      if (fun(s, 3) && fun(s, 7)) {
        cout << s << endl;
        return 0;
      }
    }
  }
  return 0;
}
