#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
	ll n; cin >> n;
	ll a[n];
	for(ll i = 0; i < n; i++) cin >> a[i];
	ll ans = 0;
	for(ll i = 0; i < n; i++){
		ans += a[i] / 2;
		if(a[i] % 2 && i < n - 1 && a[i + 1]){
			ans++;
			a[i + 1]--;
		}
	}
	cout << ans << endl;
	return 0;
}