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;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b) * b); }
long long ncr(long long n, long long r) {
  long long res = 1;
  if (r > n) return 0;
  if (r > n - r) r = n - r;
  for (long long i = 0; i < r; i++) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
struct cor {
  int x, y;
};
bool pcheck(long long a) {
  if (a == 2) return true;
  for (long long i = 2; i <= sqrt(a); i++) {
    if (a % i) continue;
    return false;
  }
  return true;
}
const int MaxN = 2e5 + 10;
const int MAXN = 120 * 1000;
int cD(long long n) { return floor(log10(n) + 1); }
long long a[MaxN];
long long b[MaxN];
long long front[MaxN] = {0}, back[MaxN] = {0};
long long last = 1000000000007;
long long n, k, x, y, x2, x3, sum = 0, sum2 = 0, i, j, g, t, ans = 0, mid;
long long d1 = 0, d2 = 0;
long long q, c, r;
vector<pair<int, int>> p;
string s2;
char ccc[100];
long long n1, n2, nc, pc, m, h, zc, l, l2, l3, l4;
int main() {
  ios_base::sync_with_stdio(false);
  string u[6] = {"050", "080", "170", "020", "200", "110"};
  string s = "1";
  cin >> n;
  if (n < 3)
    cout << -1;
  else if (n == 3)
    cout << "210";
  else {
    for (int i = 0; i < n - 4; i++) s += '0';
    int b = (n + 2) % 6;
    s += u[b];
    cout << s << "\n";
  }
  return 0;
}
