//PascalABC.Net 3.2
begin
var a:=readArrInteger ('Вводите: ', readinteger('n ='));
var max:=a[0]; var count:=0;
for var i:=0 to length(a)-1 do
begin
if a[i]>max then max:=a[i];
if a[i] mod 3<>0 then inc(count);
end;
writeln ('1: ', max);
write ('2: ', count)
end.