#include <bits/stdc++.h>
using namespace std;
long long n, min1 = 50, a[100001];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    min1 = min(min1, a[i]);
  }
  cout << (min1 ^ a[3]) + 2 << endl;
}
