VAR i,n,p,k:shortint;          {edno mom4e edin pat mi kaza:'momi4etata nqmat tehni
                             4esko mislene'...ve4e po4vam da mislq 4e naistina e taka}
o:array[1..100]of shortint;
m:array[1..100]of shortint;         {dadeno: br.juri,br.zad,br.to4ki!}
max:array[1..100]of shortint;       {tarsi se:nai-malkiq sbor to4ki!}
procedure otsenka;
 var r,l,j:Shortint;
begin
 for j:=1 to p do
  begin
  read(l);
  if l>max[r] then max[r]:=j;
  if l=max[r] then begin
                    inc(r);
                    max[r]:=j;
                   end;
  o[j]:=o[j]+1;                   {sledva6tiq pat 6a sa postaraq pove4e}
 end;
end;                              {sorry mr.peef ama ne6to ne staat ne6tata}

BEGIN
 ots4enka;
END.