n,k=list(map(int, input().split())) a=list(map(int, input().split())) b=set() for i in range((1<= k: b.add(al) b.add(pro) print(len(b))