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