#include <bits/stdc++.h>
template <typename QvQ>
inline QvQ Min(QvQ a, QvQ b) {
  if (a < b) return a;
  return b;
}
template <typename QvQ>
inline QvQ Max(QvQ a, QvQ b) {
  if (a > b) return a;
  return b;
}
template <typename QvQ>
inline void read(QvQ &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; c = getchar())
    x = (x << 1) + (x << 3) + (c ^ 48);
  x = x * f;
}
template <typename QvQ>
inline void write(QvQ x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
using namespace std;
int n;
double a[1000];
int vis[1005];
int main() {
  read(n);
  a[0] = 0x7f7f7f7f;
  for (register int i = 1; i <= n; ++i) cin >> a[i];
  int T = n - 1;
  while (T--) {
    double mn = 0x7f7f7f7f;
    int pos;
    for (register int i = 1; i <= n; ++i) {
      if (vis[i]) continue;
      if (a[i] < mn) mn = a[i], pos = i;
    }
    int c1 = 0, c2 = 0;
    vis[pos] = 1;
    for (register int i = pos - 1; i >= 1; --i) {
      if (vis[i] == 0) {
        c1 = i;
        break;
      }
    }
    for (register int i = pos + 1; i <= n; ++i) {
      if (vis[i] == 0) {
        c2 = i;
        break;
      }
    }
    if (a[c1] > a[c2]) {
      a[c2] = (a[pos] + a[c2]) / 2;
    } else {
      a[c1] = (a[pos] + a[c1]) / 2;
    }
  }
  for (register int i = 1; i <= n; ++i)
    if (!vis[i]) {
      cout << a[i];
      break;
    }
  return 0;
}
