#include int num[31][31]; int main(){ int n,s,i,j; while(~scanf("%d",&n)){ s=0; for(i=0;i