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