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