#include <stdio.h>

int main (void){
	int sum = 0;
	int count = 0;
	int numberItems;
	int n;

	printf("How many things do you want to add together? ");
	scanf("%d",&numberItems);

	while(count<numberItems){
		printf("Please enter an integer: ");
		scanf("%d",&n);
		sum = sum + n;
		count = count + 1;
	}

	printf("The sum is %d\n",sum);

	return 0;
}
