import java.util.*; public class Main { static List primes = new ArrayList(); public static long C(int n, int r, long mod) { if (n < 0 || r < 0 || r > n) return 0; if (r > n / 2) r = n - r; int[] a = new int[n]; for (int i = 0; i < r; i++) a[i] = n - i; for (int p : primes) { if (p > r) break; for (long q = p; q <= r; q *= p) { int m = (int) (n % q); for (int i = m, j = 0; j < r / q; i += q, j++) { a[i] /= p; } } } long mul = 1; for (int i = 0; i < r; i++) { mul = mul * a[i] % mod; } return mul; } static void primeget(int n) { boolean pc; primes.add(2); primes.add(3); for (int i = 4; i < n; i++) { pc = false; for (int p = 0; p < primes.size(); p++) { if (i % primes.get(p) == 0) { pc = true; break; } } if (pc == false) { primes.add(i); } } } public static void main(String[] args) { primeget(100); Scanner sc=new Scanner(System.in); int a[]=new int[26]; for(int i=0;i<26;i++){ a[i]=sc.nextInt(); } int e=a[4]; int h=a[7]; int l=a[11]; int o=a[14]; int w=a[22]; int r=a[17]; int d=a[3]; long ans=1; int x=(l+1)/2; ans*=e*h*w*r*d*(o/2)*(o-o/2); long max=0; for(int i=2;i