시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB103564455.000%

문제

Let's call positive integer smooth if each of its digits except the first and the last is less then the average of it's two neighbor digits. It means that if $x = a_n \cdot 10^n + a_{n-1} \cdot 10^{n-1} + ... + a_1 \cdot 10 + a_0$ then for each $i = 1 ... {n-1}$ the inequality $a_i < (a_{i - 1} + a_{i + 1}) / 2$ holds.

Vasya has been studying smooth numbers for a long time and he wants to know, if any smooth number of exactly $l$ digits exists, and if so, what is the greatest $l$-digit smooth number.

Vasya is asking you for help! Find the greatest $l$-digit smooth number.

출력

Input file contains the only integer $l$ ($1 \le l \le 100$) --- number of digits in smooth number.

제한

Output the greatest $l$-digit smooth number or $-1$ if it does not exist.

예제 입력 1

3

예제 출력 1

989