#include int a,b,c;int main(){for(;~(c=getchar());b+=c)c&=1,a+=c?0:b&=~1;printf("%d",a/2);}