D = { "57": 1, "-1": 2, "1": 3, "31": 4, "19": 5, "76": 6, "58": 7, "11": 8, "Al": 9, "16": 10, "20": 11, "NO": 12, "66": 13, "92": 14, "26": 15, "9.": 16, "US": 17, "73": 19, "po": 22, "2": 23, "Wi": 24 } s = input() if s[0:2] in D: print(D(s[0:2])) elif s[2] == "5": print("18") else: t = input() if t[0] != "1": print("20") else: print("21")