def part2(data):
    """Return how often the sum of 3 consecutive numbers increases."""
    numbers = list(map(int, data.splitlines()))
    return sum(sum(numbers[i-1:i+2]) < sum(numbers[i:i+3])
                for i in range(1, len(numbers) - 2))