program pil_5_7_e(input,output);
var
	x, s, max : integer;
begin
	write('Input number : ');
  read(x);
	max := x;
  s := 1;
  write('Input number : ');
  read(x);
  while x <> 0 do begin
  	if x>max then begin
    	max := x;
      s := 1;
    end
    else if x = max then s := s+1;
    write('Input number : ');
    read(x);
  end;
  WriteLn('There is ', s, ' maximums.');
end.