#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793238462643383279502884L;
template <typename T>
string toString(T x) {
  if (x == 0) return "0";
  bool negative = x < 0;
  string res;
  while (x) {
    res.push_back('0' + x % 10);
    x /= 10;
  }
  if (negative) res.push_back('-');
  reverse(res.begin(), res.end());
  return res;
}
template <typename T>
T gcd(T a, T b) {
  return a == 0 ? b : gcd(b % a, a);
}
template <typename T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
void ioFromFile(string inputFileName = "input.txt",
                string outputFileName = "output.txt") {
  ifstream* fin = new ifstream(inputFileName);
  ofstream* fout = new ofstream(outputFileName);
  cin.rdbuf(fin->rdbuf());
  cout.rdbuf(fout->rdbuf());
}
int read() {
  int x;
  scanf("%d", &x);
  return x;
}
void write(int x) { printf("%d ", x); }
int main() {
  int n = read();
  if (n <= 2) {
    cout << -1;
    return 0;
  }
  if (n == 3) {
    cout << 210;
    return 0;
  }
  string res;
  res.push_back('1');
  int rem = 1;
  for (int i = 1; i < n - 3; i++) {
    res.push_back('0');
    rem *= 10;
    rem %= 210;
  }
  rem *= 1000;
  rem %= 210;
  int tail = 210 - rem;
  if (tail < 100) res.push_back('0');
  if (tail < 10) res.push_back('0');
  cout << res << tail;
  return 0;
}
