Modify code to avoid overflow.
Find nearest larger number to the right.