using System; namespace y { class Program { static void Main(string[] args) { string s = Console.ReadLine(); int r = s.Equals("NONE") ? 256 : (int)Math.Pow(16 - s.Split(',').Length, 2); s = Console.ReadLine(); int g = s.Equals("NONE") ? 256 : (int)Math.Pow(16 - s.Split(',').Length, 2); s = Console.ReadLine(); int b = s.Equals("NONE") ? 256 : (int)Math.Pow(16 - s.Split(',').Length, 2); Console.WriteLine(r * g * b); } } }