#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 10;
long long n, a[N], cnt[2];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  reverse(a, a + n);
  for (int i = 0; i < n; i++) {
    cnt[i % 2] += (a[i] + 1) / 2, cnt[(i & 1) ^ 1] += a[i] / 2;
  }
  cout << min(cnt[0], cnt[1]) << endl;
}
