#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll>PII; const int N = 5e5 + 10; const int MOD = 998244353; const int INF = 0X3F3F3F3F; const int dx[] = {-1, 1, 0, 0, -1, -1, +1, +1}; const int dy[] = {0, 0, -1, 1, -1, +1, -1, +1}; const int M = 1e6 + 10; int main() { string s; cin >> s; ll n = s.size(); s = ' ' + s; //直接看末尾即可 int o = (int)(s[n] - '0'); if(o & 1) o = 1; else o = 2; int cnt = 0; for(int i = 1; i <= n - 1; i ++) { if(o == 1 && ((int)(s[i] - '0')) & 1) cnt ++; if(o == 2 && ((int)(s[i] - '0')) % 2 == 0) cnt ++; } cout << cnt << endl; }