#include <stdio.h>

int main(void){
    int num,i,sum,price;
    for(;sum=0,scanf("%d",&num),num;){
        for(i=0;i<num*(num-1)/2;sum+=price,i++)
            scanf("%d",&price);
        printf("%d\n",num<3?sum:sum/2);
    }
    return 0;
}