var
s,a,n,i,min,max:integer;
begin
min:=32767;
max:=-32768;
readln(n);
for i:=1 to n do
readln(a);
if a<min then min:=a;
if a>max then max:=a;
end;
s:=(min+max)/2;
writeln(s);
end.
var
s,a,n,i,min,max:integer;
begin
min:=32767;
max:=-32768;
readln(n);
for i:=1 to n do
begin
readln(a);
if a<min then min:=a;
if a>max then max:=a;
end;
s:=(min+max)/2;
writeln(s);
end.