Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came up with a few games that were connected with them.

Chilly Willy wants to find the minimum number of length n, such that it is simultaneously divisible by all numbers Willy already knows (2, 3, 5 and 7). Help him with that.

A number's length is the number of digits in its decimal representation without leading zeros.

Input

A single input line contains a single integer n (1 ≤ n ≤ 105).

Output

Print a single integer — the answer to the problem without leading zeroes, or "-1" (without the quotes), if the number that meet the problem condition does not exist.

Examples

Input

1


Output

-1


Input

5


Output

10080
#include <bits/stdc++.h>
using namespace std;
struct pq {
  int cost, node;
  bool operator<(const pq &b) const { return cost > b.cost; }
};
bool comp(pq a, pq b) { return a.cost > b.cost; }
string Addition(string a, string b);
string Multiplication(string a, string b);
string Multiplication(string a, int k);
string Subtraction(string a, string b);
string Division(string a, string b);
string Division(string a, int k);
string Div_mod(string a, string b);
int Div_mod(string a, int k);
string cut_leading_zero(string a);
int compare(string a, string b);
string Pow(string s, int a);
string _gcd(string a, string b);
string _lcm(string a, string b);
string _lcm(string a, string b) {
  return Division(Multiplication(a, b), _gcd(a, b));
}
string _gcd(string a, string b) {
  return (b == "0") ? a : _gcd(b, Div_mod(a, b));
}
string Pow(string B, int P) {
  string R = "1";
  while (P > 0) {
    if (P % 2 == 1) R = Multiplication(R, B);
    P /= 2;
    B = Multiplication(B, B);
  }
  return R;
}
string Multiplication(string a, string b) {
  int i, j, multi, carry;
  string ans, temp;
  ans = "0";
  for (j = (int)b.size() - 1; j >= 0; j--) {
    temp = "";
    carry = 0;
    for (i = (int)a.size() - 1; i >= 0; i--) {
      multi = (a[i] - '0') * (b[j] - '0') + carry;
      temp += (multi % 10 + '0');
      carry = multi / 10;
    }
    if (carry) temp += (carry + '0');
    reverse(temp.begin(), temp.end());
    temp += string((int)b.size() - j - 1, '0');
    ans = Addition(ans, temp);
  }
  ans = cut_leading_zero(ans);
  return ans;
}
string Multiplication(string a, int k) {
  string ans;
  int i, sum, carry = 0;
  for (i = (int)a.size() - 1; i >= 0; i--) {
    sum = (a[i] - '0') * k + carry;
    carry = sum / 10;
    ans += (sum % 10) + '0';
  }
  while (carry) {
    ans += (carry % 10) + '0';
    carry /= 10;
  }
  reverse(ans.begin(), ans.end());
  ans = cut_leading_zero(ans);
  return ans;
}
string Addition(string a, string b) {
  int carry = 0, i;
  string ans;
  if ((int)a.size() > (int)b.size())
    b = string((int)a.size() - (int)b.size(), '0') + b;
  if ((int)b.size() > (int)a.size())
    a = string((int)b.size() - (int)a.size(), '0') + a;
  ans.resize((int)a.size());
  for (i = (int)a.size() - 1; i >= 0; i--) {
    int sum = carry + a[i] + b[i] - 96;
    ans[i] = (char)(sum % 10 + '0');
    carry = sum / 10;
  }
  if (carry) ans.insert(0, string(1, carry + '0'));
  ans = cut_leading_zero(ans);
  return ans;
}
string Subtraction(string a, string b) {
  int borrow = 0, i, sub;
  string ans;
  if ((int)b.size() < (int)a.size())
    b = string((int)a.size() - (int)b.size(), '0') + b;
  for (i = (int)a.size() - 1; i >= 0; i--) {
    sub = a[i] - b[i] - borrow;
    if (sub < 0) {
      sub += 10;
      borrow = 1;
    } else
      borrow = 0;
    ans += sub + '0';
  }
  reverse(ans.begin(), ans.end());
  ans = cut_leading_zero(ans);
  return ans;
}
string Division(string a, string b) {
  string mod, temp, ans = "0";
  int i, j;
  for (i = 0; i < (int)a.size(); i++) {
    mod += a[i];
    mod = cut_leading_zero(mod);
    for (j = 0; j < 10; j++) {
      temp = Multiplication(b, j);
      if (compare(temp, mod) == 1) break;
    }
    temp = Multiplication(b, j - 1);
    mod = Subtraction(mod, temp);
    ans += (j - 1) + '0';
  }
  mod = cut_leading_zero(mod);
  ans = cut_leading_zero(ans);
  return ans;
}
string Division(string a, int k) {
  int i, sum = 0;
  string ans = "0";
  for (i = 0; i < (int)a.size(); i++) {
    sum = (sum * 10 + (a[i] - '0'));
    ans += (sum / k) + '0';
    sum = sum % k;
  }
  ans = cut_leading_zero(ans);
  return ans;
}
string Div_mod(string a, string b) {
  string mod, temp, ans = "0";
  int i, j;
  for (i = 0; i < (int)a.size(); i++) {
    mod += a[i];
    mod = cut_leading_zero(mod);
    for (j = 0; j < 10; j++) {
      temp = Multiplication(b, j);
      if (compare(temp, mod) == 1) break;
    }
    temp = Multiplication(b, j - 1);
    mod = Subtraction(mod, temp);
    ans += (j - 1) + '0';
  }
  mod = cut_leading_zero(mod);
  ans = cut_leading_zero(ans);
  return mod;
}
int Div_mod(string a, int k) {
  int i, sum = 0;
  for (i = 0; i < (int)a.size(); i++) sum = (sum * 10 + (a[i] - '0')) % k;
  return sum;
}
int compare(string a, string b) {
  int i;
  a = cut_leading_zero(a);
  b = cut_leading_zero(b);
  if ((int)a.size() > (int)b.size()) return 1;
  if ((int)a.size() < (int)b.size()) return -1;
  for (i = 0; i < (int)a.size(); i++)
    if (a[i] > b[i])
      return 1;
    else if (a[i] < b[i])
      return -1;
  return 0;
}
string cut_leading_zero(string a) {
  string s;
  int i;
  if (a[0] != '0') return a;
  for (i = 0; i < (int)a.size() - 1; i++)
    if (a[i] != '0') break;
  for (i = i; i < (int)a.size(); i++) s += a[i];
  return s;
}
string makeNum(int len) {
  string tmp;
  tmp.push_back('1');
  for (int i = 1; i < len; i++) tmp.push_back('0');
  return tmp;
}
int main() {
  int len;
  cin >> len;
  string nich = makeNum(len);
  string vag = Division(nich, 210);
  vag = Addition(vag, "1");
  if (Div_mod(nich, 210) == 0) vag = Subtraction(vag, "1");
  if (vag == "0") {
    cout << -1 << endl;
    return 0;
  }
  string tmp = Multiplication(vag, 210);
  if ((int)tmp.size() == len)
    cout << tmp << endl;
  else
    cout << -1 << endl;
  return 0;
}
