#include <bits/stdc++.h>
using namespace std;
long long n, x;
vector<long long> h;
int main() {
  ios_base::sync_with_stdio(false);
  h.assign(2, 0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    h[0] += (x + 1 - i % 2) / 2;
    h[1] += (x + i % 2) / 2;
  }
  cout << min(h[0], h[1]);
  return 0;
}
