PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000147. Số xấu đặc biệt (Bad Ugly Numbers)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Số xấu đặc biệt (Bad Ugly Numbers)

Bad Ugly Numbers

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Find a positive decimal integer of exactly nn digits, containing no zero digit, that is not divisible by any digit appearing in it. Print -1 if impossible. Print it as a decimal string.

Input

One line with nn.

Output

An nn-digit decimal integer, or -1.

Subtask

  • Subtask 1 (20 points): 1≤n≤101\le n\le10.
  • Subtask 2 (30 points): 1≤n≤10001\le n\le1000.
  • Subtask 3 (50 points): 1≤n≤1000001\le n\le100000.

Example

Input

3

Output

233

Explanation

The number 233 has three nonzero digits. It is odd, so not divisible by 2, and its digit sum is 8, so it is not divisible by 3.