func_code_string: #include <bits/stdc++.h>   using namespace std;   const int oo = 0x3f3f3f3f;   const long long ooo = 9223372036854775807ll;   const int _cnt = 1000 * 1000 + 7;   const int _p = 1000 * 1000 * 1000 + 7;   const int N = 300005;   const double PI = acos(-1.0);   const double eps = 1e-9;   int o(int x) { return x % _p; }   int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }   int lcm(int a, int b) { return a / gcd(a, b) * b; }   void file_put() {     freopen( filename.in ,  r , stdin);     freopen( filename.out ,  w , stdout);   }   int n, a[N], L, t;   long long ret = 0;   int main() {     scanf( %d , &n);     for (int i = (1); i <= (n); ++i) scanf( %d , &a[i]), ret += a[i];     for (int i = (1); i <= (n); ++i) {       if (a[i] >= 2)         t = ((a[i] >> 1) < (L) ? (a[i] >> 1) : (L)), a[i] -= t << 1, L -= t;       a[i] %= 3, L += a[i];     }     printf( %lld n , (ret - L) / 3);     return 0;   }   