n = input()
m = input()
k = n.split(" ")
l = m.split(" ")
for i in k:
    k[k.index(i)] = int(i)
for i in l:
    l[l.index(i)] = int(i)
n = k[0]
a = list(range(1, n+1))
for i in l:
    a.remove(i)
lst = [0]*(2*n)
cn = 0
for i in a:
    for j in a:
        if i+j not in lst:
            lst[cn] = i+j
            cn = cn+1
while 0 in lst:
    lst.remove(0)
print(len(lst))
