#include <bits/stdc++.h>
using namespace std;
int n, a[32];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int res = a[2];
  sort(a, a + n);
  printf("%d\n", 2 + (res ^ a[0]));
  return 0;
}
