#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  bool f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = 0;
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + c - '0';
  if (f) return x;
  return 0 - x;
}
const int inf = 0x3f3f3f3f;
const int maxn = 200000 + 10;
int n, x, p = 0;
long long w, b;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    b += x / 2;
    w += x / 2;
    if (x & 1) {
      b += p;
      w += !p;
    }
    p = !p;
  }
  cout << min(b, w) << endl;
  return 0;
}
