Change solution to problem 17 so that it can handle convert 0.