var
a:array[0..100] of longint;
f:array[0..2000,0..2000] of boolean;
i,j,k,sum,n:longint;
begin
readln(n);
for i:=1 to n do
read(a[i]);
f[0,0]:=true;
for i:=1 to n do
begin
for j:=sum downto 0 do
for k:=sum downto 0 do
if f[j,k] then
begin
f[j,k+a[i]]:=true;
f[j+a[i],k]:=true;
end;
sum:=sum+a[i];
end;
for i:=sum downto 1 do
if f[i,i] then
begin
writeln(i);
halt;
end;
writeln('Impossible');
end.