Adding support for zero and negative numbers for Problem 17.