using System; public class Hello { public static void Main() { var s = Console.ReadLine().Trim(); var sL = s.Length; var ans = 0; foreach (var x in s) if (x == '0' | x == '4' | x == '6' | x == '9') ans += 1; else if (x == '8') ans += 2; Console.WriteLine(ans + 1 + 2 * sL); } }