#include<iostream> #include<iomanip> #include<string> #include<algorithm> #include<vector> #include<set> #include<list> #include<queue> #include<math.h> #include<bitset> using ll = long long; using namespace std; int main(){ ll d, e, h, maxl, l, o, maxo, r, w, tmp; vector<int> alph(26); for (int i = 0; i < 26; i++) cin >> alph[i]; d = alph[3]; e = alph[4]; h = alph[7]; l = alph[11]; o = alph[14]; r = alph[17]; w = alph[22]; maxo = o/2 * (o - o/2); for (int i = 2; i < l; i++){ tmp = i*(i-1)/2 * (l - i); maxl = max(maxl, tmp); } cout << d*e*h*maxl*maxo*r*w << endl; }