n,k = [int(n) for n in input().split()]
m = [int(n) for n in input().split()]

def is_present(a):
    return a <= n and a not in m

p = []
for a in range(1,n + 1):
    if a not in m:
        p.append(a)

used = []

for a in p:
    for b in p:
        if a + b not in used:
            used.append(a+b)

print(len(used))
