func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, a[300005], tp, lt, ans;   int main() {     cin >> n;     for (int i = 1; i <= n; i++) scanf( %lld , &a[i]);     for (int i = 1; i <= n; i++) {       tp = min(a[i] / 2, lt);       lt -= tp;       a[i] -= tp * 2;       ans += tp + a[i] / 3;       lt += a[i] % 3;     }     cout << ans;   }   