#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, sum = 0, prev = 0, x = 0;
  cin >> n;
  long long int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    x += ((arr[i] - prev) % 2) ? ((arr[i] - prev) / 2 + 1)
                               : ((arr[i] - prev) / 2);
    prev = !prev;
    sum += arr[i];
  }
  cout << min(x, sum - x);
}
