n,k=map(int,input().split()) a=list(map(int,input().split())) s=set() for bit in range(1<=k: s.add(ans1) s.add(ans2) print(len(s))