#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,x;
	cin>>n;
	long long ans = 0, sum = 0;
	for(int i=1;i<=n;i++)
	{
		cin>>x;
		if(x==0)
		{
			ans+=sum/2;
			sum=0;
		}
		else sum += x;
	}
	cout<<ans+sum/2<<endl;
	return 0;
}