#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  int k = arr[2];
  sort(arr, arr + n);
  int p = (k | arr[0]) & (~k | ~arr[0]);
  cout << 2 + p;
}
