#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a = 0, b, v[1999], minim = 199999;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
    minim = min(minim, v[i]);
  }
  cout << 2 + (minim ^ v[3]);
}
