#include <bits/stdc++.h>
using namespace std;
class BDominoForYoung {
 public:
  void solve(std::istream &in, std::ostream &out) {
    int n;
    in >> n;
    long long answer = 0;
    int total = 0;
    for (int i = 0; i < n; ++i) {
      int u;
      in >> u;
      answer += u / 2;
      if (u & 1) {
        if (i & 1) {
          total++;
          if (total <= 0) answer++;
        } else {
          total--;
          if (total >= 0) answer++;
        }
      }
    }
    out << answer << endl;
  }
};
int main() {
  BDominoForYoung solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}
