#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  if (n < 3)
    printf("-1\n");
  else if (n == 3)
    printf("210\n");
  else {
    printf("1");
    int m = 50;
    for (int i = 0; i < n - 4; i++) {
      m = m * 10 % 210;
      printf("0");
    }
    printf("%03d\n", m);
  }
  return 0;
}
