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 ≤ 10^5).


-----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

Difficulty: MEDIUM

Solutions:
n = int(input())
if n < 3:
	print(-1)
	exit()
else:
	x = n % 6
	if x == 0:
		res = 10 ** 5 + 20
	elif x == 1:
		res = 10 ** 6 + 20
	elif x == 2:
		res = 10 ** 7 + 20
	else:
		res = 10 ** (x - 1) + 20
tmp = 0
while res % 7:
	res += 30
	tmp += 30
if n <= 8:
	print(res)
else:
	res = str(20 + tmp)
	print('1' + '0' * (n - 1 - len(res)) + res)


n = int(input())

def printans(n):
	if n == 1:
		print(-1)
		return
	if n == 2:
		print(-1)
		return
	if n == 3:
		print(210)
		return
	if n == 4:
		print(1050)
		return
	k = ''
	p = n
	p %= 6
	if p == 1:
		k = '1' + '0' * (n - 3) + '2'
	if p == 2:
		k = '1' + '0' * (n - 4) + '20'
	if p == 3:
		k = '1' + '0' * (n - 4) + '11'
	if p == 4:
		k = '1' + '0' * (n - 3) + '5'
	if p == 5:
		k = '1' + '0' * (n - 3) + '8'
	if p == 0:
		k = '1' + '0' * (n - 4) + '17'
	print(k + '0')
printans(n)


n = int(input())
if n < 3:
	print(-1)
elif n == 3:
	print(210)
else:
	suff = ''
	if n % 6 == 4:
		suff = '50'
	elif n % 6 == 5:
		suff = '80'
	elif n % 6 == 0:
		suff = '170'
	elif n % 6 == 1:
		suff = '20'
	elif n % 6 == 2:
		suff = '200'
	elif n % 6 == 3:
		suff = '110'
	main = n - 1 - len(suff)
	print('1' + '0' * main + suff)


n = int(input())
if n <= 2:
	print(-1)
elif n == 3:
	print(210)
else:
	x = 2 * pow(10, n - 1, 21) % 21
	(a, b) = (x // 10, x % 10)
	print('1' + '0' * (n - 4) + str(a) + str(b) + '0')


n = int(input())
if n < 3:
	print(-1)
elif n == 3:
	print(210)
elif n == 4:
	print(1050)
else:
	fl = 0
	hs = [3, 2, 6, 4, 5, 1]
	ans = []
	for i in range(10):
		for j in range(10):
			if (i + j + 1) % 3 == 0:
				g = 0
				if (n - 4) % 6 == 0:
					g = 6
				else:
					g = (n - 4) % 6
				if (1000 * hs[g - 1] + 100 * i + 10 * j) % 7 == 0:
					fl = 1
					ans = [i, j]
					break
		if fl == 1:
			break
	li = ['1']
	li += ['0'] * (n - 4)
	print(''.join(li), end='')
	print(ans[0], ans[1], '0', sep='')


n = int(input()) - 1
if n < 2:
	print(-1)
elif n == 2:
	print(210)
else:
	k = str(210 - 10 * pow(10, n - 1, 21))
	print('1' + '0' * (n - len(k)) + k)


x = int(input())
if x in [1, 2]:
	print(-1)
elif x == 3:
	print(210)
else:
	print('1' + '0' * (x - 4 + 3 - len(str(210 - pow(10, x - 1, 210)))) + str(210 - pow(10, x - 1, 210)))


from sys import *
from math import *

def mod(a, m):
	x = 0
	for i in reversed(a):
		x = (x * 10 + int(i)) % m
	r = []
	t = m - x
	while t > 0:
		r.append(t % 10)
		t //= 10
	return r

def main():
	n = int(input())
	k = 2 * 3 * 5 * 7
	if n < 3:
		print(-1)
		return 0
	elif n == 3:
		print(k)
	else:
		t = [1 if i == 0 else 0 for i in range(n)]
		t = t[::-1]
		r = mod(t, k)
		c = 0
		for i in range(len(r)):
			t[i] = r[i]
		for i in reversed(t):
			print(i, end='')
main()


n = int(input())
if n < 3:
	print(-1)
	exit(0)
if n == 3:
	print(210)
	exit(0)
ans = 50
for _ in range(n - 4):
	ans = ans * 10 % 210
s = str(ans)
print('1' + '0' * (n - len(s) - 1) + s)


import sys
from math import log2, floor, ceil, sqrt
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
n = int(ri())
val = 210
if n <= 2:
	print(-1)
elif n == 3:
	print(210)
else:
	rem = 10 ** (n - 1) % val
	if rem == 0:
		print(1, end='')
		for i in range(n - 1):
			print(0, end='')
		print()
	else:
		rem = 210 - rem
		rem = str(rem)
		print(1, end='')
		for i in range(n - 1 - len(rem)):
			print(0, end='')
		print(rem)


import re
import itertools
from collections import Counter

class Task:
	n = 0
	answer = ''

	def getData(self):
		self.n = int(input())

	def solve(self):
		n = self.n
		if n < 3:
			self.answer = '-1'
			return
		if n == 3:
			self.answer = '210'
			return
		tenRemainders = [1, 3, 2, 6, 4, 5]
		for x in range(0, 100):
			if (tenRemainders[(n - 1) % 6] + x * 10) % 7 == 0 and (1 + x // 10 + x % 10) % 3 == 0:
				self.answer = '1' + '0' * (n - 4)
				self.answer += '0' + str(x) if x < 10 else str(x)
				self.answer += '0'
				return

	def printAnswer(self):
		print(self.answer)
task = Task()
task.getData()
task.solve()
task.printAnswer()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if not True else 1):
	n = int(input())
	if n < 3:
		print(-1)
	elif n == 3:
		print(210)
	elif n == 4:
		print(1050)
	else:
		print('1' + '0' * (n - 5) + ['0080', '0170', '0020', '0200', '0110', '0050'][(n - 5) % 6])


import math as mt
import sys, string
input = sys.stdin.readline
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
from collections import defaultdict
n = I()
if n < 3:
	print(-1)
elif n == 3:
	print(210)
else:
	x = [50, 80, 170, 20, 200, 110]
	print('1' + '0' * (n - 1 - len(str(x[(n - 4) % 6]))) + str(x[(n - 4) % 6]))


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz/'
M = 998244353
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
n = Int()
if n < 3:
	print(-1)
elif n == 3:
	print(210)
else:
	print(1, '0' * (n - 4), end='', sep='')
	n -= 4
	ans = {}
	ans[0] = '050'
	ans[1] = '080'
	ans[2] = '170'
	ans[3] = '020'
	ans[4] = '200'
	ans[5] = '110'
	print(ans[n % 6])
4 - 1050
5 - 10080
6 - 100170
7 - 1000020
8 - 10000200
9 - 100000110
10 - 1000000050