#include <bits/stdc++.h>
using namespace std;
const int maxn = 300 * 1000 + 10;
int a[maxn], n;
long long sum, w, b;
long long ABS(long long x) {
  if (x < 0) return -x;
  return x;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    if (i & 1) {
      w += (a[i] + 1) / 2;
      b += a[i] / 2;
    } else {
      b += (a[i] + 1) / 2;
      w += a[i] / 2;
    }
  }
  cout << (sum - ABS(w - b)) / 2;
  return 0;
}
