import sequtils,strutils var N = stdin.readline.parseInt A = stdin.readline.split.map(parseInt) cnt = 0 f = false for i, a in A: if f == false: f = true cnt += 1 elif i > 0 and A[i - 1] == a: f = true cnt += 1 else: f = false echo cnt