#include <bits/stdc++.h>
using namespace std;
const int MAX = 5e5 + 10;
int main() {
  int n, a;
  long long ans = 0, x = 0, y = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    ans += a / 2;
    a %= 2;
    if (a) {
      if (i & 1)
        x++;
      else
        y++;
    }
  }
  cout << ans + min(x, y) << endl;
}
