C = [int(input()) for _ in range(26)] n = 1 n = C[7]*C[4]*C[22]*C[17]*C[3] n1 = C[14] n11=n1//2 n12 = n1-n11 n = n*n11*n12 n2 = C[11] n21 = n2//3 n2 = n2-n21 n22 = n2//2 n23 = n2-n22 n = n*n21*n22*n23 print(n)