#include #include #include #include #include #include using namespace std; #define INF 2000000007 #define MOD 1000003 #define MAX 105 #define REP(i,n) for(int i=0;i<(n);++i) #define REPS(i,s,t) for(int i=(s);i<(t);++i) typedef unsigned int uint; typedef unsigned long long int ull; bool DP[105][10010]; int main(){ int N;cin>>N; vector W(N+2); REPS(i,1,N+1) cin>>W[i]; int suml = accumulate(W.begin(),W.end(),0); if(suml%2==1){ cout << "impossible\n"; return 0; } suml /= 2; REPS(i,1,N+1)DP[i][0]=true; for(int i=1;i<=N;++i){ for(int j=0;j<=suml;++j){ if(j