w[10000];n;main(i){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);}