#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
string s;
cin >> s;
int counter = 0;
for(int i=0, n=s.size(); i<n; i++){
counter += (i&1) ? s[i]-'0' : -(s[i]-'0');
}
cout << abs(counter) << "\n";
}