#include <bits/stdc++.h>
using namespace std;
const int MX = 1000001;
const int MI = 100001;
const int MT = 10001;
int main() {
  long long int n, ans = 0;
  cin >> n;
  ans = (n * (n + 1)) / 2;
  n--;
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    ans -= x;
  }
  cout << ans << endl;
  return 0;
}
