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