int@n,@m,@a[2*n+1];VI@s(m),t,v(n+1);t=s;rep(i,m)v[s[i]]=1;rep(i,t.size()){rep(j,m)if(!v[n=a[t[i]+s[j]]])v[n]=1,t.push_back(n);}wt(n=t.size());