#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long po(long long a, long long b) {
  if (b == 0) return 1 % mod;
  long long y = po(a, b / 2);
  y = y * y % mod;
  if (b % 2 == 1) y = y * a % mod;
  return y;
}
long long inv(long long i) { return po(i, mod - 2); }
struct trie {
  long long cnt;
  trie* ch[2];
  trie() : cnt(0ll) {
    ch[0] = NULL;
    ch[1] = NULL;
  }
};
int n;
int a[300005];
long long ans = 0;
int lst[300005];
void solve() {
  int cr = -1;
  cin >> n;
  for (long long i = (long long)0; i != (long long)n; i = i + 1) cin >> a[i];
  ;
  for (long long i = (long long)0; i != (long long)n; i = i + 1) {
    ans += 1ll * (a[i] / 2);
    a[i] = a[i] % 2;
    if (a[i] == 1) {
      if (cr != -1 && (i - cr) % 2 == 1) {
        ans += 1;
        cr = lst[cr];
        lst[i] = cr;
      } else {
        lst[i] = cr;
        cr = i;
      }
    } else {
      lst[i] = cr;
    }
  }
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
