void main()
{
    long n = readln.chomp.to!long;

    bool[] cards = new bool[n];
    long pair;
    foreach (i; 0 .. n)
    {
        long a = readln.chomp.to!long;
        pair += a / 2;
        cards[i] = a % 2 == 1;
    }

    foreach (i; 1.iota(n).stride(2))
    {
        if (cards[i] && cards[i-1])
        {
            ++pair;
            cards[i] = false;
        }
        if (i < n - 1 && cards[i+1] && cards[i])
        {
            ++pair;
            cards[i+1] = false;
        }
    }

    pair.writeln;
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;