#include <bits/stdc++.h>
using namespace std;
void solve(istream &in, ostream &out) {
  int n;
  in >> n;
  if (n <= 2) {
    out << -1;
    return;
  }
  if (n == 3) {
    out << 210;
    return;
  }
  switch (n % 6) {
    case 4:
      out << 1;
      for (int i = 0; i < n - 3; ++i) out << 0;
      out << 50;
      return;
    case 5:
      out << 1;
      for (int i = 0; i < n - 3; ++i) out << 0;
      out << 80;
      return;
    case 0:
      out << 1;
      for (int i = 0; i < n - 4; ++i) out << 0;
      out << 170;
      return;
    case 1:
      out << 1;
      for (int i = 0; i < n - 3; ++i) out << 0;
      out << 20;
      return;
    case 2:
      out << 1;
      for (int i = 0; i < n - 4; ++i) out << 0;
      out << 200;
      return;
    case 3:
      out << 1;
      for (int i = 0; i < n - 4; ++i) out << 0;
      out << 110;
      return;
  }
}
int main() {
  solve(cin, cout);
  return 0;
}
