#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
long long int powmod(long long int a, int b, int n) {
  long long int rm = 1;
  while (b) {
    if (b % 2) {
      rm = (rm * a) % n;
    }
    a = (a * a) % n;
    b /= 2;
  }
  return rm;
}
char s[100100];
int main() {
  int m, n, p, d = 2 * 3 * 5 * 7, rem, f1;
  cin >> n;
  if (n < 4) {
    m = 1;
    for (int i = 1; i < n; ++i) m *= 10;
    f1 = m - m % d + d;
    m *= 10;
    if (f1 >= m)
      cout << -1 << endl;
    else
      cout << f1 << endl;
  } else {
    rem = 1;
    s[0] = '1';
    for (int i = 1; i < n; ++i) {
      rem = rem * 10;
      rem = rem % d;
      s[i] = '0';
    }
    d = d - rem;
    p = n - 1;
    while (d) {
      s[p] = d % 10 + 48;
      d /= 10;
      --p;
    }
    s[n] = '\0';
    cout << s << endl;
  }
  return 0;
}
