add 1 from leetcode