import sys
from collections import deque
m,n = map(int,input().split())
a = input().split()
q = deque() #实例化队列
cnt = 0
for x in a:
if x not in q:
if len(q) == m:
q.popleft() #弹出队头元素
q.append(x) #队列尾插入
cnt += 1
print(cnt)

京公网安备 11010502036488号