#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  std::vector<int> v;
  cin >> n;
  int mi;
  mi = 33;
  for (int i = 0; i < n; ++i) {
    cin >> k;
    v.push_back(k);
    mi = min(k, mi);
  }
  cout << 2 + (v[2] ^ mi) << "\n";
  return 0;
}
