#!/bin/bash

read in1
a=(`echo $in1 | fold -1`)
p=${#in1}
i=0
n=0
if [ ${in1:0:1} -eq 1 ]; then
  let ++i
fi
for x in ${a[@]}; do
  if [ $((i%2)) -ne $x ]; then
    let ++n
  fi
  let ++i
done
echo $n