#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
const ll INF = ll(1e18);
const int inf = numeric_limits<int>::max();
const int N = 55;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n], minn = 0x3f3f3f3f;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    minn = min(minn, a[i]);
  }
  cout << 2 + (a[2] ^ minn) << endl;
  return 0;
}
