N = int(input()) line = input().split(" ") li = [] for i in range(N): li.append(int(line[i])) print(abs((N*(N+2))//2 - sum(li)))