#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, a[1005], sum = 0, d[1005];
  cin >> n;
  d[0] = 1;
  for (long long i = 1; i < 50; i++) {
    d[i] = d[i - 1] * 2;
  }
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  sum = a[0] / d[n - 1];
  for (long long i = 1; i < n; i++) {
    sum += a[i] / d[n - i];
  }
  cout << sum;
}
