#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, min = INT_MAX, ans, two = 0;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    if (min > x) {
      min = x;
    }
    if (i == 3) {
      two += x;
    }
  }
  ans = two ^ min;
  cout << ans + 2;
  return 0;
}
