405838: GYM102133 I Number builder

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

I. Number buildertime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard output

This will be a simple task. Even more. We like to generate different numbers, we think and you will like it. You are given an integer s. Try to generate the maximum number with the sum of digits equal to s, which does not contain zeros, and also any adjacent digits are not equal.

Input

The single line contains the number s.

1 ≤ s ≤ 42
Output

Output a single number containing the answer to the problem.

ExamplesInput
1
Output
1
Input
2
Output
2

加入题单

算法标签: