#include <iostream>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <iomanip>
#include <stack>
#include <numeric>
#include <ctime>
#include <string>
#include <bitset>
#include <unordered_map>
#include <unordered_set>

using namespace std;
using ll = long long;
const ll N=1e6+5,mod=1e9+7,inf=0x3f3f3f3f;


void solve(){
    string a;
    cin>>a;
    
    map<char,int>mp;
    mp['1']=mp['3']=mp['5']=mp['7']=mp['9']=1;

    int ans=0;
    int len=a.size()-1;

    for(int i=0;i<a.size()-1;i++){
        if((mp[a[i]]+mp[a[len]])%2==0)ans++;
    }
    cout<<ans<<'\n';
}

int main(){
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);

    int t=1;
    //cin>>t;

    while(t--){
        
        solve();

    }
 
    return 0;
}