func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 500005, mod = 1000000007;   long long int a, b, c, d, e, f, g, h[N], arr[N];   string s;   vector<long long int> v;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     cin >> a;     long long int ans = 0, tek = 0, cift = 0;     for (long long int i = 1; i <= a; i++) {       cin >> arr[i];       ans += arr[i] / 2;       if (i % 2 == 0)         cift += arr[i] % 2;       else         tek += arr[i] % 2;       if (tek and cift) tek--, cift--, ans++;     }     cout << ans << endl;   }   