number = eval(input())

le = len(number)

wst = [0] * le

bst = [0] * le

for k in range(le):

  if k % 2 == 0:

    wst[k] = 1

  else:

    bst[k] = 1

wsc = 0

bsc = 0

for k in range(le):

  if int(number[k]) != wst[k]:

    wsc += 1

  if int(number[k]) != bst[k]:

    bsc += 1

print((min([wsc,bsc])))
s = eval(input())

n = len(s)

z0 = 0

z1 = 0

for i in range(n):

  if int(s[i]) ^ (i%2) == 0:

    z0 += 1

  else:

    z1 += 1

print((min(z0,z1)))
number = eval(input())
le = len(number)
wst = [0] * le
bst = [0] * le
for k in range(le):
    if k % 2 == 0:
        wst[k] = 1
    else:
        bst[k] = 1
wsc = 0
bsc = 0
for k in range(le):
    if int(number[k]) != wst[k]:
        wsc += 1
    if int(number[k]) != bst[k]:
        bsc += 1
print((min([wsc, bsc])))

s = eval(input())
n = len(s)
z0 = 0
z1 = 0
for i in range(n):
    if int(s[i]) ^ (i % 2) == 0:
        z0 += 1
    else:
        z1 += 1
print((min(z0, z1)))

-number = eval(input()) -le = len(number) -wst = [0] * le -bst = [0] * le -for k in range(le): -    if k % 2 == 0: -        wst[k] = 1 +s = eval(input()) +n = len(s) +z0 = 0 +z1 = 0 +for i in range(n): +    if int(s[i]) ^ (i % 2) == 0: +        z0 += 1 -        bst[k] = 1 -wsc = 0 -bsc = 0 -for k in range(le): -    if int(number[k]) != wst[k]: -        wsc += 1 -    if int(number[k]) != bst[k]: -        bsc += 1 -print((min([wsc, bsc]))) +        z1 += 1 +print((min(z0, z1)))