#include <bits/stdc++.h>
#define fore(i,a,b) for(int i=a,to=b;i<to;++i)
using namespace std;
typedef long long ll;

int n;
int a[100005];

int main(){
	scanf("%d",&n);
	fore(i,0,n)scanf("%d",a+i);
	ll r=0;
	fore(i,0,n){
		r+=a[i]/2;
		a[i]%=2;
		if(a[i]&&a[i+1])r++,a[i+1]--;
	}
	printf("%lld\n",r);
	return 0;
}