get_string(String) :-
  current_input(Input),
  read_string(Input, ' \n', '', _, String).
 
get_number(Number) :-
  get_string(String),
  number_string(Number, String).

get(0,[]) :- !.
get(N,[S|R]) :-
  Next is N - 1,
  get_string(S),
  get(Next,R).

kind([H],1).
kind([H1,H2|R],A) :- 
  H1 == H2,!,
  kind([H2|R],A).
kind([H1,H2|R],A) :-
  kind([H2|R],B),
  A is B + 1.

main :-
  get_number(N),
  get(N,R),
  sort(R,RR),
  kind(RR,Ans),
  writeln(Ans).