#include <bits/stdc++.h>
using namespace std;
long long n, m, a[100010], t, b, d, s, mi = INT_MAX;
template <class frd>
inline void read(frd &a) {
  bool f = 0;
  a = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = 1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    a = (a << 1) + (a << 3) + (ch ^ 48), ch = getchar();
  }
  if (f) a = -a;
}
template <typename T>
inline void readc(T &x) {
  while (x = getchar(), !islower(x) && !isupper(x))
    ;
}
inline string read1() {
  char ch = getchar();
  string st1 = "";
  while (!((ch >= 'a') && (ch <= 'z') || (ch >= 'A') && (ch <= 'Z')))
    ch = getchar();
  while ((ch >= 'a') && (ch <= 'z') || (ch >= 'A') && (ch <= 'Z'))
    st1 += ch, ch = getchar();
  return st1;
}
template <typename T>
inline void print(T x, char c = '\n') {
  static int buf[40];
  if (x == 0) {
    putchar('0');
    putchar(c);
    return;
  }
  if (x < 0) putchar('-'), x = -x;
  for (buf[0] = 0; x; x /= 10) buf[++buf[0]] = (x % 10 ^ 48);
  while (buf[0]) putchar((char)buf[buf[0]--]);
  putchar(c);
}
int main() {
  read(n);
  for (register int i = 1; i <= n; i++) {
    read(a[i]);
    mi = min(mi, a[i]);
  }
  print((a[3] ^ mi) + 2);
  return 0;
}
