#include <bits/stdc++.h>
const long long maxn = 3e6 + 9;
long long Read() {
  long long x(0), f(1);
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3ll) + (x << 1ll) + c - '0';
    c = getchar();
  }
  return x * f;
}
long long T, n;
long long a[maxn], sum[2];
int main() {
  n = Read();
  for (long long i = 1; i <= n; ++i) {
    long long x(Read());
    if ((x + i) & 1) {
      sum[1] += (x + 1) / 2;
      sum[0] += (x - (x + 1) / 2);
    } else {
      sum[0] += (x + 1) / 2;
      sum[1] += (x - (x + 1) / 2);
    }
  }
  std::cout << std::min(sum[0], sum[1]);
}
