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