#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (auto& i : a) cin >> i;
  long long m = INT_MAX;
  for (auto& i : a) m = min(m, i);
  cout << 2 + (m ^ a[2]);
}
