#include <bits/stdc++.h>
long long n, i, t, k, c;
using namespace std;
int main() {
  while (cin >> n) {
    if (n < 3)
      cout << "-1\n";
    else if (n == 3)
      cout << "210\n";
    else {
      t = n;
      while (1) {
        t = t - 6;
        if (t < 4) break;
      }
      t += 6;
      if (t == 4) {
        k = 50;
        c = n - 3;
      }
      if (t == 5) {
        k = 80;
        c = n - 3;
      }
      if (t == 6) {
        k = 170;
        c = n - 4;
      }
      if (t == 7) {
        k = 20;
        c = n - 3;
      }
      if (t == 8) {
        k = 200;
        c = n - 4;
      }
      if (t == 9) {
        k = 110;
        c = n - 4;
      }
      cout << 1;
      for (i = 0; i < c; i++) cout << "0";
      cout << k << endl;
    }
  }
}
