import java.math.BigInteger; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] al = new int[26]; for(int i=0;i<26;i++){ al[i]=sc.nextInt(); } int ans=1; if(al[3]<1){ System.out.println(0); return; } ans*=al[3]; if(al[4]<1){ System.out.println(0); return; } ans*=al[4]; if(al[7]<1){ System.out.println(0); return; } ans*=al[7]; if(al[11]<3){ System.out.println(0); return; } int temp1=1; for(int i=2;i