# ABC124C - Coloring Colorfully

import sys

input = sys.stdin.readline



s = input().rstrip()

a = s[0]

ans = 0

for i, j in enumerate(s):

    if i % 2 == 0:

        if j != a:

            ans += 1

    else:

        if j == a:

            ans += 1

print(ans)
# ABC124C - Coloring Colorfully

def main():

    s = eval(input())

    a, ans = s[0], 0

    for i, j in enumerate(s):

        if (i % 2 and j == a) or (not i % 2 and j != a):

            ans += 1

    print(ans)





if __name__ == "__main__":

    main()
# ABC124C - Coloring Colorfully
import sys

input = sys.stdin.readline
s = input().rstrip()
a = s[0]
ans = 0
for i, j in enumerate(s):
    if i % 2 == 0:
        if j != a:
            ans += 1
    else:
        if j == a:
            ans += 1
print(ans)

# ABC124C - Coloring Colorfully
def main():
    s = eval(input())
    a, ans = s[0], 0
    for i, j in enumerate(s):
        if (i % 2 and j == a) or (not i % 2 and j != a):
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

-import sys +def main(): +    s = eval(input()) +    a, ans = s[0], 0 +    for i, j in enumerate(s): +        if (i % 2 and j == a) or (not i % 2 and j != a): +            ans += 1 +    print(ans) -input = sys.stdin.readline -s = input().rstrip() -a = s[0] -ans = 0 -for i, j in enumerate(s): -    if i % 2 == 0: -        if j != a: -            ans += 1 -    else: -        if j == a: -            ans += 1 -print(ans) + +if __name__ == "__main__": +    main()