Var A:array[1..100] of integer; B,MN,i,N,j:integer; S,C:string; Begin ReadLn(S); S+=' '; For i:= 1 to Length(S) do if (S[i]<>' ') then C+=S[i] else if (N=0) then begin N:=StrToInt(C); C:='' end else begin j+=1; A[j]:=StrToInt(C); C:='' End; For i:= 1 to N do if (A[i]>B) then B:=A[i]; MN:=B; For i:= 1 to N do if (A[i]