#include <bits/stdc++.h>
using namespace std;
map<char, char> d;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[11];
  int minVal = 1000000000;
  for (int i = 1; i <= n; i++) cin >> a[i], minVal = min(minVal, a[i]);
  int res = 2 + (a[3] ^ minVal);
  cout << res << endl;
  return 0;
}
