def calculateCaptcha(input, distance):
    sum = 0
    for i in range(0, len(input)):
        if input[i] == input[(i + distance) % len(input)]:
            sum += int(input[i])
    return sum


def main():
    data = ''
    with open('input.txt', 'r') as myfile:
        data = myfile.read()
    print(calculateCaptcha(data, 1))
    print(calculateCaptcha(data, int(len(data) / 2)))


main()

de5d4505c07531245aa86e04c2b27b0f4d5a92a0
<mask token>

<mask token>


def main():
    data = ''
    with open('input.txt', 'r') as myfile:
        data = myfile.read()
    print(calculateCaptcha(data, 1))
    print(calculateCaptcha(data, int(len(data) / 2)))


<mask token>

def calculateCaptcha(input, distance):
    sum = 0
    for i in range(0, len(input)):
        if input[i] == input[(i + distance) % len(input)]:
            sum += int(input[i])
    return sum


def main():
    data = ''
    with open('input.txt', 'r') as myfile:
        data = myfile.read()
    print(calculateCaptcha(data, 1))
    print(calculateCaptcha(data, int(len(data) / 2)))


<mask token>

def calculateCaptcha(input, distance):
    sum = 0
    for i in range(0, len(input)):
        if input[i] == input[(i + distance) % len(input)]:
            sum += int(input[i])
    return sum


def main():
    data = ''
    with open('input.txt', 'r') as myfile:
        data = myfile.read()
    print(calculateCaptcha(data, 1))
    print(calculateCaptcha(data, int(len(data) / 2)))


main()
