#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
const int INF = 1e9;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  long long a[n + 1];
  long long res = 0;
  for (int i = 1; i <= n; i++) cin >> a[i], res += a[i] / 2, a[i] %= 2;
  int c = 0, l = 0;
  for (int i = 1; i <= n; i++) {
    if (!a[i]) continue;
    if (i & 1)
      l++;
    else
      c++;
  }
  cout << res + min(c, l);
  return 0;
}
