using System; namespace y { class Program { static void Main(string[] args) { Console.WriteLine("1000000007".Length - Console.ReadLine().Length); } } }