S=list(map(int,eval(input())))



ans1=0

for i in range(0,len(S),2):

  if S[i]==1:

    ans1+=1

for i in range(1,len(S),2):

  if S[i]==0:

    ans1+=1



ans2=0

for i in range(0,len(S),2):

  if S[i]==0:

    ans2+=1

for i in range(1,len(S),2):

  if S[i]==1:

    ans2+=1



print((min(ans1,ans2)))

s=eval(input())

s=list(s)

c=0

for i in range(0,len(s),2):

    if s[i]=='0':

        c+=1

for i in range(1,len(s),2):

    if s[i]=='1':

        c+=1

d=0

for i in range(0,len(s),2):

    if s[i]=='1':

        d+=1

for i in range(1,len(s),2):

    if s[i]=='0':

        d+=1

    

print((min(c,d)))
S = list(map(int, eval(input())))
ans1 = 0
for i in range(0, len(S), 2):
    if S[i] == 1:
        ans1 += 1
for i in range(1, len(S), 2):
    if S[i] == 0:
        ans1 += 1
ans2 = 0
for i in range(0, len(S), 2):
    if S[i] == 0:
        ans2 += 1
for i in range(1, len(S), 2):
    if S[i] == 1:
        ans2 += 1
print((min(ans1, ans2)))

s = eval(input())
s = list(s)
c = 0
for i in range(0, len(s), 2):
    if s[i] == "0":
        c += 1
for i in range(1, len(s), 2):
    if s[i] == "1":
        c += 1
d = 0
for i in range(0, len(s), 2):
    if s[i] == "1":
        d += 1
for i in range(1, len(s), 2):
    if s[i] == "0":
        d += 1
print((min(c, d)))

-S = list(map(int, eval(input()))) -ans1 = 0 -for i in range(0, len(S), 2): -    if S[i] == 1: -        ans1 += 1 -for i in range(1, len(S), 2): -    if S[i] == 0: -        ans1 += 1 -ans2 = 0 -for i in range(0, len(S), 2): -    if S[i] == 0: -        ans2 += 1 -for i in range(1, len(S), 2): -    if S[i] == 1: -        ans2 += 1 -print((min(ans1, ans2))) +s = eval(input()) +s = list(s) +c = 0 +for i in range(0, len(s), 2): +    if s[i] == "0": +        c += 1 +for i in range(1, len(s), 2): +    if s[i] == "1": +        c += 1 +d = 0 +for i in range(0, len(s), 2): +    if s[i] == "1": +        d += 1 +for i in range(1, len(s), 2): +    if s[i] == "0": +        d += 1 +print((min(c, d)))