A binary number can be encoded into decimal digits by the following counting method.
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.
Print out in each line the decimal digits corresponding to the binary number. There is no space between digits.