#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n <= 2)
    cout << "-1";
  else if (n == 3)
    cout << "210";
  else {
    int mod = 1;
    for (int i = 1; i < n; ++i) mod = (mod * 10) % 210;
    if (n > 3) cout << "1";
    for (int i = 0; i < n - 4; ++i) cout << "0";
    if (210 - mod < 100) cout << "0";
    cout << 210 - mod;
  }
}
