object Main{
	def main(args:Array[String]){
		val s = new java.util.Scanner(System.in)
		val t=s.next.toCharArray
		val a=(0 until t.length).count(i=>i%2+'0'==t(i))
		val b=(0 until t.length).count(i=>(i+1)%2+'0'==t(i))
		println(math.min(a,b))
	}
}
