function main(input) { input = input.split("\n"); let c = []; for(let i=0; i<26; i++) { c[i] = BigInt(input[i]); } let ans = c[3] * c[4] * c[7] * c[17] * c[22]; const lNum = c[11]; let max = 0n; for(let i=2n; i<=lNum; i++) { const value = i * (i-1n) / 2n * (lNum - i); if(value > max) max = value; } ans *= max; const oNum = c[14]; max = 0n; for(let i=1n; i<=oNum; i++) { const value = i * (oNum -i); if(value > max) max = value; } ans *= max; console.log(ans.toString()); } main(require("fs").readFileSync("/dev/stdin", "utf8"));