using System;
namespace Program
{
	class Sample
    {
    	static void Main()
        {
          	int count = 0;
          	char c = '1';
        	string a = Console.ReadLine();
			count = a.Length - a.Replace(c.ToString(),"").Length;
			Console.WriteLine(count);
        }
    }
}