dynamic programming - step climbing problem