import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int count = 0;
        for(int i=0;i<s.length()-1;i++){
            int pre = s.charAt(i)-'0';
            int suf = s.charAt(s.length()-1)-'0';
            if((pre + suf) % 2 == 0){
                count++;
            }
        }
        System.out.println(count);
    }
  
}