import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] s = new String[3]; for(int i=0; i<3; i++){ s[i]= sc.next(); } if(s[1].equalsIgnoreCase("2")){ System.out.println("4"); }else if(s[1].equalsIgnoreCase("3")){ System.out.println("1"); }else if(s[1].equalsIgnoreCase("?")){ System.out.println("14"); } } }