Олимпиадный тренинг

Задача 18697. Number of pairs of identical numbers next to each other


Задача

Темы:
Among the given N natural numbers, determine how many of them are pairs of identical numbers standing side by side.

Input
The first line contains a natural number N - the number of numbers. In the second line - N natural numbers (\(2<=N<=100\), all numbers do not exceed 100 ).

Imprint
Print a single number - the number of pairs of identical numbers standing side by side.
 
 
Examples
# Input Output
1
5
1 3 2 2 3
1
2
4
1 1 1 1
3