#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const* argv[]) {
  if (argc == 3) {
    freopen(argv[1], "r", stdin);
    freopen(argv[2], "w", stdout);
  }
  int n;
  scanf("%d", &n);
  if (n <= 3) {
    puts(n <= 2 ? "-1" : "210");
  } else {
    printf("1");
    int p = 50;
    for (int i = 1; i <= n - 4; ++i) {
      printf("0");
      p = (p * 10) % 210;
    }
    printf("%03d\n", p);
  }
  return 0;
}
