#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, k;
  cin >> n;
  int t[10];
  int m = 64;
  for (int i = 0; i < n; ++i) {
    cin >> t[i];
    m = t[i] < m ? t[i] : m;
  }
  cout << 2 + (m xor t[2]);
  return 0;
}
