One panda named orz is playing a interesting game, he gets a big integerNumand an integerK. In this game, he can exchange two single numbers inNum. For example, he can get 1243 from 3241 by exchange 1 and 3.But orz can exchange at mostKtimes. So what’s the biggest number after at mostKtimes operations?
However, a VIP (Very Important Panda) of ACM/OPPC (Orz Panda Programming Contest) comittee thought this problem was too hard for Orz Pandas. So he simplified this problem with constraintK=1. Your task is to solve the simplified problem.