#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  int k = 0;
  if (n == 1 || n == 2)
    cout << -1;
  else if (n == 3)
    cout << 210;
  else
    for (int i = 4; i <= n; i++) {
      k++;
      if (k == 7) k = 1;
    }
  if (k == 1) {
    cout << 1;
    for (int i = 2; i <= n - 2; i++) cout << 0;
    cout << 50;
  } else if (k == 2) {
    cout << 1;
    for (int i = 2; i <= n - 2; i++) cout << 0;
    cout << 80;
  } else if (k == 3) {
    cout << 1;
    for (int i = 2; i <= n - 3; i++) cout << 0;
    cout << 170;
  } else if (k == 4) {
    cout << 1;
    for (int i = 2; i <= n - 2; i++) cout << 0;
    cout << 20;
  } else if (k == 5) {
    cout << 1;
    for (int i = 2; i <= n - 3; i++) cout << 0;
    cout << 200;
  } else if (k == 6) {
    cout << 1;
    for (int i = 2; i <= n - 3; i++) cout << 0;
    cout << 110;
  }
  return 0;
}
