dp1.py: smallest number of steps to 1