#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int64_t a, b;
  cin >> a;
  a = a * (a + 1) / 2;
  while (cin >> b) a -= b;
  cout << a;
}
