Archiving#2615

Archiving

1 second
64 megabytes
Easy

RLE compression algorithm works as follows. The file is treated as a sequence of bits. Continuous chains of zeros and ones are replaced by a number equal to the length of the chain, with the maximum length limited to (very long chains are split into several parts and encoded by several numbers, with zeros inserted between them). For uniqueness, the first chain is always considered a chain of zeros (if the sequence begins with , then is written as the first number during compression).

Input

The first line contains the number (1 \leq K \leq 1000). The second line contains a sequence of zeros and ones terminated by the number . The length of the sequence is a natural number not exceeding 10^6.

Output

Print the compressed sequence (see examples).

Examples

Example 1

Loading
Loading