#include <bits/stdc++.h>
using namespace std;
int a[20];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  cout << 2 + (a[3] ^ *min_element(a + 1, a + n + 1));
  return 0;
}
