#include #include #include #include #include #include #include #include #include static const int MOD = 1000000007; using ll = int64_t; using u32 = uint32_t; using namespace std; template constexpr T INF = ::numeric_limits::max()/32*15+208; int main() { vector v(26); for (int i = 0; i < 26; ++i) cin >> v[i]; ll ans1 = v[7]*v[4]*v[22]*v[17]*v[3]*(v[14]/2)*(v[14]/2+v[14]%2), ans2 = 0; for (ll i = 2; i < v[11]; ++i) { ans2 = max(ans2, i*(i-1)*(v[11]-i)/2); } cout << ans1*ans2 << "\n"; return 0; }