#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp;
  cin >> n;
  long long k = 1;
  k *= n;
  k *= n + 1;
  k /= 2;
  for (int i = 0; i < n - 1; i++) {
    cin >> temp;
    k -= temp;
  }
  cout << k << endl;
  return 0;
}
