import util from more_itertools.recipes import sliding_window as sw input = util.get_input("1.input", int) def day_1(input, size): return len([1 for [a, b] in sw(sw(input, size), 2) if sum(a) < sum(b)]) print(day_1(input, 1)) print(day_1(input, 3))