#include <bits/stdc++.h>
using namespace std;
template <class T>
T input() {
  T x;
  cin >> x;
  return x;
}
int main() {
  const int n = input<int>();
  if (n <= 2) {
    cout << -1 << endl;
    return 0;
  }
  if (n == 3) {
    cout << 210 << endl;
    return 0;
  }
  int x = 210 - 1000 % 210;
  for (int i = 0; i < n - 4; ++i) {
    x *= 10;
    x %= 210;
  }
  cout << 1;
  cout << setw(n - 1) << setfill('0') << x;
}
