N = int(input().strip()) A = [int(i) for i in input().strip().split(' ')] print(N*(N+1)//2 - sum(A))