#include <bits/stdc++.h>
using namespace std;
int k = 100;
int max(int a, int b) {
  if (a > b) return a;
  return b;
}
int calc(vector<int>& a, int l, int r) {
  bool is_sorted = 1;
  for (int i = l + 1; i < r; ++i) {
    if (a[i] < a[i - 1]) {
      is_sorted = 0;
      break;
    }
  }
  if (is_sorted) return r - l;
  int m = (l + r) / 2;
  return max(calc(a, l, m), calc(a, m, r));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  int min = 100000;
  for (int i = 0; i < n; ++i)
    if (a[i] < min) min = a[i];
  cout << 2 + (a[2] ^ min);
}
