using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static void Main(string[] args) { int n = Console.ReadLine().Count(a => a == '0'); Console.WriteLine(n > 8 ? n - 8 : 8 - n); Console.ReadLine(); } } }