#include<bits/stdc++.h>
#define maxn 100005
#define ll long long 
using namespace std;
ll n, ans, a[maxn];
int main()
{
	scanf("%lld", &n);
	for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
	for (int i = 1; i < n; i++)
	{
		if (!(a[i] & 1)) ans += a[i] / 2;
		else 
		if (a[i+1] == 0) ans += a[i] / 2;
		else ans += (a[i] / 2 + 1), a[i+1]--; 
	}
	if (a[n]) ans += a[n] / 2;
	printf("%lld", ans);
}