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