sum of n integers in python