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