sum = 0 for i = 1, 5 do n = io.read("*n") s = tostring(n) if(n % 15) == 0 then sum = sum + 8 elseif (n % 3 == 0 or n % 5 == 0) then sum = sum + 4 else sum = sum + string.len(s) end end print(sum)