#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j;
  cin >> n;
  if (n <= 2) {
    puts("-1");
    return 0;
  }
  int s = 210;
  string t = "1";
  int res = 1;
  for (i = 1; i < n; i++) {
    t += "0";
    res *= 10;
    res %= 210;
  }
  res = 210 - res;
  int id = t.size() - 1;
  while (res > 0) {
    t[id] += res % 10;
    res /= 10;
    id--;
  }
  cout << t;
}
