program main
  implicit none
  character(100000) :: s
  integer :: i, k, n, a = 0, b = 0

  read *, s
  n = len_trim(s)

  do i = 1, n
    read (s(i:i), *), k
    if (k /= mod(i, 2)) a = a + 1
    if (k /= mod(i+1, 2)) b = b + 1
  end do

  print '(i0)', min(a, b)
    
end

