import java.util.*; import java.io.*; public class Main{ static final Reader sc = new Reader(); static final PrintWriter out = new PrintWriter(System.out,false); public static void main(String[] args) throws Exception { int[] c = new int[26]; for(int i=0;i<26;i++){ c[i] = sc.nextInt(); } int ans = 1; for(int i=0;i<26;i++){ if(i==3){ ans *= c[i]; } else if(i==4){ ans *= c[i]; } else if(i==7){ ans *= c[i]; } else if(i==11){ int x = 0; for(int j=2;j