LogiQuest

122. Count and Say

MediumSimulation

Term 1 is 1. Each next term describes the previous one: 1 → one 1 → 11 → two 1s → 21 → 1211 … Print term n.

Input format

A single integer n.

Output format

The n-th term.

Example 1

Input

1

Output

1

Example 2

Input

4

Output

1211

Constraints

1 ≤ n ≤ 30

Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.

Loading the MyLoginn IDE…