#include <stdio.h>
int main() {
    char a[100000];
    int j=0,k=0,i=0;
    while(a[i-1]!='\n')
    {
        scanf("%c",&a[i]);
        if(a[i]=='\n')
        {
            break;
        }
        if((a[i]-'0')%2==0)
        {
            j=j+1;
            i++;
        }else if((a[i]-'0')%2==1){
            k=k+1;
            i++;
        }
        
    }
    if((a[i-1]-'0')%2==0)
    {
        printf("%d",j-1);
    }else{
        printf("%d",k-1);
    }
    return 0;
}