#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
long long a[N];
int main() {
  int n;
  cin >> n;
  if (n <= 2) return cout << -1, 0;
  int ans = 1;
  if (n == 3) return cout << 210, 0;
  for (int i = 1; i < n; i++) ans = (ans * 10) % 210;
  ans = 210 - ans;
  cout << 1;
  for (int i = 4; i < n; i++) cout << 0;
  printf("%03d", ans);
  return 0;
}
