2중 for문을 돌면서
-- list_N[i]와 list_N[j]이 같으면 패스
-- 없으면 total += 1
N,M = map(int,input().split())
list_N = list(map(int,input().split()))
total = 0
for i in range(len(list_N)):
for j in range(i, len(list_N)):
if list_N[i] != list_N[j]:
total += 1
print(total)