#include <bits/stdc++.h>
using namespace std;
long long n, c1, c2, s[300300];
inline long long read() {
  long long w = 1, q = 0;
  char ch = ' ';
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') w = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') q = q * 10 + ch - '0', ch = getchar();
  return w * q;
}
inline void write(long long x) {
  if (x < 0) {
    x = ~(x - 1);
    putchar('-');
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
int main() {
  n = read();
  for (long long i(1); i <= n; i++) s[i] = read();
  for (long long i(1); i <= n; i++) {
    int k = s[i] >> 1;
    c1 += k;
    c2 += k;
    if (s[i] % 2) {
      if (i % 2)
        c1++;
      else
        c2++;
    }
  }
  write(c1 > c2 ? c2 : c1);
  return 0;
}
