Solution to the POTD Smallest Integer problem.