Sherlock and Watson are both best friend. They are fond of collecting lucky tickets, every ticket have 6 digits PNR number. A ticket is lucky if the sum of first three digits of PNR is equal to sum of last three digits of PNR.
For example, PNR no 162612 is lucky because sum of 1+6+2=9, and 6+1+2=9.
Since the PNR number of the ticket wasn’t lucky, Sherlock and Watson needs your help to find the next lucky ticket number.
For example, if Sherlock’s ticket number is 165901, then the next lucky ticket number is 165903.
Given Sherlock’s current ticket number, find and print the next lucky ticket number.
Input Format
Constraints
Output Format