P12324 [AOJ] Contest T-shirts
普及
题目描述

Contest T-shirts

Segtree has $ M $ contest T-shirts.

He decided to spend $ N $ days on the contest T-shirt alone, and told $i = 1, 2, 3, \ dots, N$ "$ A_i $ T-shirt on the $ i $ day." I made a plan for $ N $ to wear.

However, if you keep the current plan, you may not be able to do the laundry in time, so I would like to change the plan if necessary so that I will not wear the same clothes for two consecutive days.

Find the minimum number of plans that need to be changed. It can be proved that the conditions can always be met by changing the plan under the given constraints.

input

Input is given from standard input in the following format.

$ M $ $ N $
$ A_1 $ $ A_2 $ $\$ $ A_N $

output

Output the minimum number of plans that need to be changed.

However, insert a line break at the end.

Constraint

  • $2 \ leq M \ leq 10 ^ 9$
  • $1 \ leq N \ leq 10 ^ 5$
  • $1 \ leq A_i \ leq M$
  • All inputs are integers.

Input example 1

twenty three
2 2 1

Output example 1

1

Input example 2

3 6
1 1 1 2 2 3

Output example 2

2

Example

Input

2 3
2 2 1

Output

1

输入格式

见题面

输出格式

见题面

样例输入
2 3 2 2 1
样例输出
1