import java.util.*; public class Main{ static StringBuilder sb = new StringBuilder(""); public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s1 = sc.next(); String s2 = sc.next(); String s3 = sc.next(); String result; if (s2.equals("?")) { result="14"; }else{ if (s2.equals("2")) { result="4"; }else{ result="1"; } } System.out.println(result); } }