#include <bits/stdc++.h>
using namespace std;
unsigned long long sum, n, x;
int main() {
  cin >> n;
  for (int i = 1; i < n; ++i) {
    cin >> x;
    sum += x;
  }
  cout << (1LL * n * (n + 1)) / 2 - sum << '\n';
  return 0;
}
