#include"bits/stdc++.h"
using namespace std;
int main(){
	long long n,ans=0,temp;
	vector<long long> x;
	cin>>n;
	for(int i=0;i!=n;++i){
		cin>>temp;
		x.push_back(temp);
	}
	for(int i=0;i!=n-1;++i){
		ans+=x[i]/2;
		x[i]%=2;
		if(x[i] && x[i+1]){
			++ans;
			--x[i+1];
		}
	}
	ans+=x.back()/2;
	cout<<ans;
}