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