with open("input.txt", 'r') as f:
    data = list(map(int, f.read().strip().split('\n')))
    # print(data)

    inc = 0
    sums = []

    for i, n in enumerate(data[:-2]):
        sums.append(sum(data[i:i+3]))

    print(sums)

    prev_sum = sums[0]

    for s in sums[1:]:
        if s > prev_sum:
            inc += 1

        prev_sum = s

    print(inc)

#     for i, n in enumerate(data[:-2]):
#         # print(n)
#         cur_sum = sum(data[i:i+3])

#         if i == 0:
#             prev_sum = cur_sum
#             pass

#         if cur_sum > prev_sum:
#             inc += 1
#             prev_sum = cur_sum
        
# print(inc)