#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const long long MAXN = 10000001;
const long long INF = 1e18;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << '\n';
  err(++it, args...);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long sum = 0;
  for (long long i = 0; i < n - 1; i++) {
    long long x;
    cin >> x;
    sum += x;
  }
  cout << (n * (n + 1)) / 2 - sum;
}
