using System; using System.Linq; class Program { static void Main(string[] args) { var line = Console.ReadLine().Split(' '); int idx = 0; for (int i = 0; i < line.Length; i++) { if (line[i] == "?") { idx = i; break; } } string result = string.Empty; line[idx] = "1"; result = (line.Min().CompareTo(line[1]) == 0 || line.Max().CompareTo(line[1]) == 0) ? "1" : "4"; if (result == "1") { line[idx] = "4"; result = (line.Min().CompareTo(line[1]) == 0 || line.Max().CompareTo(line[1]) == 0) ? "14" : "1"; Console.WriteLine(result); } else Console.WriteLine(result); } }