N[11],i,n;main(s,a,p){while(gets(p=a)){for(;s=N[i]=strtol(p,&p,0),s+!i;n=++i);for(;n;)i