#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define llong long long int comb(int n, int k) { int result = 1; rep(i, k) result *= (n-i); rep(i, k) result /= i+1; return result; } int max_comb(int n) { int ret = 1; for(int i=2; i temp(26); rep(i, 26) cin >> temp[i]; llong result = 1; result *= temp[7] == 0 ? 0 : 1; result *= temp[4] == 0 ? 0 : 1; result *= temp[11] < 3 ? 0 : max_comb(temp[11]); result *= temp[14] < 2 ? 0 : (temp[14] / 2 * (temp[14] / 2 + temp[14] % 2)); result *= temp[22] == 0 ? 0 : 1; result *= temp[17] == 0 ? 0 : 1; result *= temp[3] == 0 ? 0 : 1; cout << result << endl; }