Encoding binary numbers#2538

Encoding binary numbers

1 second
64 megabytes
Easy

A binary number can be converted to decimal digits using the following method.

Input

The input consists of several lines, each containing a string representing a binary number. The length of the binary number in each line is between and , inclusive. A line that contains only zero (0) indicates the end of the input and should not be converted. The input may contain up to lines.

Output

For each line, output the decimal digits corresponding to the binary number. There should be no spaces between digits.

Examples

Example 1

Loading
Loading