#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  double arr[n], ans, temp;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  ans = DBL_MIN;
  double a, b, c;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      for (int k = 0; k < n; k++) {
        if (k == i || k == j) continue;
        temp = (arr[i] / 4) + (arr[j] / 4) + (arr[k] / 2);
        if (temp > ans) {
          ans = temp;
        }
      }
    }
  }
  cout << ans << endl;
  return 0;
}
