#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, x, ans = 0;
  cin >> n;
  priority_queue<long> q;
  q.push(-1);
  for (long i = 0; i < n; i++) {
    cin >> x;
    if (x % 2 == 1) {
      if (q.top() != -1 && (i - q.top() + 1) % 2 == 0) {
        ans++;
        q.pop();
      } else {
        q.push(i);
      }
    }
    ans += x / 2;
  }
  cout << ans << endl;
  return 0;
}
