#!/usr/bin/env python3

with open('input.txt', 'r') as f:
    data = f.readline().strip()

#data = '91212129'

prev = data[-1]
res = 0
for l in data:
    if prev == l:
        res += int(l)
    prev = l

print(res)


983cfcafa06ee192dc27356cdc8379b6268d24f6
<mask token>

with open('input.txt', 'r') as f:
    data = f.readline().strip()
<mask token>
for l in data:
    if prev == l:
        res += int(l)
    prev = l
print(res)

with open('input.txt', 'r') as f:
    data = f.readline().strip()
prev = data[-1]
res = 0
for l in data:
    if prev == l:
        res += int(l)
    prev = l
print(res)

#!/usr/bin/env python3

with open('input.txt', 'r') as f:
    data = f.readline().strip()

#data = '91212129'

prev = data[-1]
res = 0
for l in data:
    if prev == l:
        res += int(l)
    prev = l

print(res)

