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