#include <bits/stdc++.h>
using namespace std;
const int N = 333333;
long long a[N], b[N];
long long ans, even, odd;
int n, tot;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%lld", &a[i]), ans = ans + a[i] / 2, a[i] = a[i] % 2;
  for (int i = 1; i < n; i++) {
    if (a[i] == 1 && a[i + 1] == 1) {
      a[i] = a[i + 1] = 0;
      ans++;
    }
  }
  for (int i = 1; i <= n; i++)
    if (a[i] == 1) {
      if (i % 2 == 0)
        even++;
      else
        odd++;
    }
  printf("%lld\n", ans + min(even, odd));
  return 0;
}
