#include <bits/stdc++.h>
using namespace std;

typedef vector<int> vi;
typedef pair<int, int> pi;
typedef long long ll;

#define LB lower_bound
#define UB lower_bound
#define F first
#define S second
#define MP make_pair
#define B begin
#define E end
#define PUB push_back
#define POB pop_back
#define REP(i,a,b) for(int i = a; i <= b; ++i)

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);


    int N;
    std::cin >> N ;
    long long count = 0;
    long long a = 0;
    bool rest = false;
    for (int i = 0; i < N; ++i) {
        std::cin >> a ;
        if(a%2 == 0)
        {
            count += a/2;
            rest = false;
        }
        else{
            count +=  a/2;
            if(rest){
                count += 1;
                rest = false;
            }
            else{
                rest = true;
            }

        }
    }
    std::cout << count << std::endl;

    return 0;
}