n, k = list(map(int, input().split())) s = list(map(int, input().split())) count = 1 for i in range(n-1): if s[i] != s[0:k]: count += 1 print(count)