#include <bits/stdc++.h>
using namespace std;
long long n, minim = 1e18, V[100];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> V[i];
    minim = min(minim, V[i]);
  }
  cout << 2 + (V[3] ^ minim);
  return 0;
}
