Cumsum[i-1] in case i = 0

the cumsum[-1] does not exists