f = open("input"); part1 = 0; results = []; not_found = True; loopcount = 0; myinput = []; for i in f: myinput.append(int(i)); while not_found: for i in myinput: #print(i, "endofline"); part1 += i; results.append(part1); #for x in results: if (results.count(part1) > 1): part2 = part1; print(part2); not_found = False; break; loopcount += 1; #print("loop", loopcount); #results.sort(); #for i in results: # print(i); print(part1); print(part2);