This is a problem from ZOJ 1499.To make it easyer,you just need output the last number.If there are leading zeros you should delete it.
输入解释
Input will consist of multiple test cases. Each case will consist of one line, containing a string of digits of maximum length 80. A line consisting of a single 0 terminates input.