#include <bits/stdc++.h>
using namespace std;
mt19937 gen(chrono::system_clock::now().time_since_epoch().count());
const int N = 1e5 + 10;
const long long MOD = 1e9 + 7;
const int rx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int ry[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
const long double eps = 1e-7;
const double pi = acos(-1.0);
const int INF = 2e9 + 10;
vector<int> a(N, 1e9);
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  cout << (2 + (a[2] ^ (*min_element(a.begin(), a.end())))) << endl;
  return 0;
}
