if __name__ == "__main__": elves = [] with open('input', 'r') as f: sum_ = 0 for line in f: if line.strip() == '': elves.append(sum_) sum_ = 0 else: sum_ += int(line.strip()) elves.append(sum_) largest = max(elves) print(f'Max Value: {largest}') top3 = 0 for i in range(3): largest = max(elves) top3 += largest elves.remove(largest) print(f'Top 3: {top3}')