1、Note that we return the accumulated value when the counter I reaches 1.
2、Note that we return the accumulated value when the counter I reaches 1. we're ignoring invalid negative integers.