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