#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, min = 100, a[10], result;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < min) {
      min = a[i];
    }
  }
  result = 2 + (min ^ a[2]);
  cout << result << endl;
  return 0;
}
