t = list(eval(input()))



def count(t,start):

     ans = 0

     for i in range(len(t)):

          if (i%2 == 0) and (t[i] != start):

               ans += 1

          if (i%2 == 1) and (t[i] == start):

               ans += 1

     return ans

     

ans = min(count(t,'0'), count(t,'1'))

print(ans)
t = list(eval(input()))

 

ans = min(t[::2].count('0') + t[1::2].count('1'),t[::2].count('1') + t[1::2].count('0'))

     

print(ans)
t = list(eval(input()))


def count(t, start):
    ans = 0
    for i in range(len(t)):
        if (i % 2 == 0) and (t[i] != start):
            ans += 1
        if (i % 2 == 1) and (t[i] == start):
            ans += 1
    return ans


ans = min(count(t, "0"), count(t, "1"))
print(ans)

t = list(eval(input()))
ans = min(
    t[::2].count("0") + t[1::2].count("1"), t[::2].count("1") + t[1::2].count("0")
)
print(ans)

- - -def count(t, start): -    ans = 0 -    for i in range(len(t)): -        if (i % 2 == 0) and (t[i] != start): -            ans += 1 -        if (i % 2 == 1) and (t[i] == start): -            ans += 1 -    return ans - - -ans = min(count(t, "0"), count(t, "1")) +ans = min( +    t[::2].count("0") + t[1::2].count("1"), t[::2].count("1") + t[1::2].count("0") +)