sum of value from 1 to N