#D9922. B Problem
B Problem
B Problem
Problem statement
There are two integers and . The process of finding by writing in decimal is shown below.
- Express and in decimal. Subscripts are in order from the bottom, , . is the number of digits of when expressed in decimal. When the number of digits of is less than , the upper digit is supplemented with .
- Set .
- Repeat the following process from to . 3.1. If , then , . 3.2. If , then , .
The calculation result of is . However, the top-level consecutive is removed.
If you forget to carry down, in the process of 3.2 becomes . Find the maximum value of the calculation result when you forget to carry down the maximum times.
Constraint
input
Input follows the following format. All given numbers are integers.
output
Output the maximum value of the calculation result on one line.
Examples
Input
99 98 1
Output
1
Input
100 2 3
Output
198
Input
538 84 1
Output
554
Input
2012 1987 1
Output
1025
inputFormat
input
Input follows the following format. All given numbers are integers.
outputFormat
output
Output the maximum value of the calculation result on one line.
Examples
Input
99 98 1
Output
1
Input
100 2 3
Output
198
Input
538 84 1
Output
554
Input
2012 1987 1
Output
1025
样例
538 84 1
554