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