Increasing Sequences

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 1424
64-bit integer IO format: %I64d      Java class name: Main

Description

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

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.

Output

For each instance,output the last number.

Sample Input

3456 
3546 
3526 
0001 
100000101

Sample Output

6
46
26
1
101

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .