i,j,s,a[1<<17];main(k){for(;++j