A boy asked his mother for M rupees in integer and using digits of M he created another integer N which is greater than M and the difference between M and N must be the least possible. Now help the his mother to find the integer N.

For example:

M= 2345

output will be 2354 (=N)

since the difference between M and N will be 9 which is least.

similarly if M =321

output will be 321(=N)

since in this case the difference between M and N will be 0 which is again the least possible difference