#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string x;
  cin >> n;
  if (n > 3) {
    x = "1";
    for (int i = 2; i <= n - 3; i++) x += "0";
    n -= 3;
    switch (n % 6) {
      case 1:
        x += "050";
        break;
      case 2:
        x += "080";
        break;
      case 3:
        x += "170";
        break;
      case 4:
        x += "020";
        break;
      case 5:
        x += "200";
        break;
      case 0:
        x += "110";
        break;
    }
    n += 4;
    cout << x;
  } else if (n == 3)
    cout << 210;
  else
    cout << -1;
  return 0;
}
