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