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