using System;
using System.Linq;
using System.Collections.Generic;

public class Hello
{
    public static void Main()
    {
        
        string s = Console.ReadLine();
        if(s == "0")
        {
            Console.WriteLine(0);
            return;
        }
        
        var list1 = new List<int>();
       
        for (int i = 0; i < s.Length; i++)
        {
           int num = int.Parse(s[i].ToString());
           list1.Add(num);
        }
        
        
        int count = 0;
        for(int i = 0; i < list1.Count; i++)
        {
            if(list1[i] == 0) count++;
        }
        Console.WriteLine(2 * count);
    }
}
