/**
 * Created by IntelliJ IDEA.
 * User: o_220
 * Date: 21.10.2009
 * Time: 19:35:47
 * To change this template use File | Settings | File Templates.
 */  import java.util.*;
    import java.io.*;
public class Main {
    public static void main(String[] args) throws Exception{
        Scanner s= new Scanner(new File("computer.in"));
        PrintWriter p= new PrintWriter (new File("computer.out"));
        char [] c = s.next().toCharArray();
        int l = c.length;
        int n=0;
        int t=1;
        for (int i=0; i < l; i++) {
            if (c [i] - '0' == t) {
                t = (t+1)%2;
                n++;
            }
        }
        p.println(n);
        s.close();
        p.close();
    }
}
