#include <stdio.h>

int main(void)
{
	int k, c, sum;
	int i;
	
	while (scanf("%d", &k), k != 0){
		sum = 0;
		for (i = 0; i < k * (k - 1) / 2; i++){
			scanf("%d", &c);
			sum += c;
		}
		
		printf("%d\n", sum);
	}
	
	return (0);
}