#include<cstring>
#include<cstdio>
#include<iostream>
using namespace std;
int main() {
	int n;
	scanf("%d", &n);
	long long ans(0), cur(0);
	for(int i(0); i < n; i++) {
		int x;
		scanf("%d", &x);
		if(x == 0) {
			ans += cur / 2;
			cur = 0;
		}else {
			cur += x;
		}
	}
	ans += cur / 2;
	cout << ans << endl;
}
