using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static void Main(string[] args) { var nn = Console.ReadLine().Split().Select(int.Parse) .Select(n => n % 15 == 0 ? 8 : n % 5 == 0 ? 4 : n % 3 == 0 ? 4 : n.ToString().Count()) .Sum(); Console.WriteLine(nn); Console.ReadLine(); } } }