| Author: | И. Блинов | Time limit: | 1 sec | |
| Input file: | Standard input | Memory limit: | 512 Mb | |
| Output file: | Standard output |
Let there be an infinite sequence of binary strings s[1], s[2], s[3], …. Each string is obtained as follows:
For each k, string s[k] is a concatenation of altering blocks of digits.
In particular:
The first 10 strings are:
0
10
010
1010
01011
101001
0101101
10100100
010110111
1010010001
Given an integer n find and output the string s[n].
The first line of the input contains a single integer n.
Output a single string of length n as described in the problem statement.
1 ≤ n ≤ 105
| No. | Standard input | Standard output |
|---|---|---|
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|