Solved 5.3 find the next smallest and largest int that has the same # of 1's with the input