#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const int maxn = 2e5 + 20;
int main() {
  int n, t, col = 0;
  cin >> n;
  if (n < 3) cout << -1;
  if (n == 3) cout << 210;
  if (n > 3) {
    t = (n - 4) % 6;
    if (t == 0) col = n - 3;
    if (t == 1) col = n - 3;
    if (t == 2) col = n - 4;
    if (t == 3) col = n - 3;
    if (t == 4) col = n - 4;
    if (t == 5) col = n - 4;
    cout << 1;
    for (int i = 0; i < col; i++) cout << 0;
    if (t == 0) cout << 50;
    if (t == 1) cout << 80;
    if (t == 2) cout << 170;
    if (t == 3) cout << 20;
    if (t == 4) cout << 200;
    if (t == 5) cout << 110;
  }
}
