A balanced number is a
3-digit number whose second digit is equal to the sum of the first and last digit.
Write a program which reads and sums balanced numbers. You should stop when an unbalanced number is given.
Input data is read from the standard input (the console)
- Numbers will be given
- Each one will be on a separate line
Print to the standard output
- Print the sum of the balanced numbers
- No more than
1000numbers will be given
Sample test 1
Sample test 2
275 693 110 742