N=int(input()) W=list(map(int,input().split())) SUM=sum(W) if SUM%2!=0: print("impossible") exit() X=SUM//2 DP=1 for w in W: DP=DP|(DP<