eolymp
bolt
Try our new interface for solving problems
Problems

Encoding binary numbers

Encoding binary numbers

Time limit 1 second
Memory limit 64 MiB

A binary number can be encoded into decimal digits by the following counting method.

Input data

The input includes lines of a character string representing a binary number. The length of a binary number in each line is between 1 and 100 inclusive. The line containing only zero (0) indicates the end of the input. The last line must not be encoded into decimal digits. The input may contain up to 1000 lines.

Output data

Print out in each line the decimal digits corresponding to the binary number. There is no space between digits.

Examples

Input example #1
111100000011
000
0101010101010101
11
0
Output example #1
416021
30
10111011101110111011101110111011
21