var first, other, n, i, count : integer;
begin
repeat write('n = '); readln(n)
until n > 0;
write('1-ый элемент = '); readln(first);
for i := 2 to n do begin
write(i, '-ый элемент = '); readln(other);
if first = other then inc(count)
end;
writeln('Ответ: ', count)
end.