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