#include <bits/stdc++.h>   long long int a[300000];   int main() {     long long int n, i, hei, bai;     while (scanf( %lld , &n) != EOF) {       hei = bai = 0;       for (i = 0; i < n; i++) {         scanf( %lld , &a[i]);         if (i % 2) {           hei += (a[i] + 1) / 2;           bai += a[i] / 2;         } else {           bai += (a[i] + 1) / 2;           hei += a[i] / 2;         }       }       printf( %lld n , bai < hei ? bai : hei);     }     return 0;   }   