w[9999],t,s;main(j){for(;~scanf("%d",&t);)for(s-=t*j,j=1e4;j--;w[j+t]+=w[j]);t=!puts("impossible"+(~s%2&&w[s/2])*2);}