# create a function to add n elements
def add_it_up(No):
#initialize sum to 0
Sum=0
# iterate over n elements and sum them
for i in range(No+1):
Sum=Sum+i
print("Sum of {} elements is {}".format(No,Sum))
#take the input form the user for no of elements
No=int(input("Enter the no of elements to be added: "))
add_it_up(No)