filename = "../../inputs/2021/day1-1.txt"
with open(filename) as f:
    lines = f.readlines()
prevValueRead = False
increases = 0
prevFullWindow=0
prevprevWindow=0
prevWindow=0
curWindow=0
readingCount=0

for input_line in lines:
    readingCount += 1
    newVal = int(input_line)
    prevprevWindow = newVal + prevWindow
    prevWindow = newVal + curWindow 
    curWindow = newVal
    if readingCount == 3:
        prevFullWindow = prevprevWindow
        #print("Window: "+str(prevFullWindow))
    elif readingCount > 3:
        if prevprevWindow > prevFullWindow :
            increases += 1
        prevFullWindow = prevprevWindow
        #print("Window: "+str(prevFullWindow))
 

print("Number of increases: "+str(increases))
8c25563135bf4665a029b00bc8bf9dbb7d83507a
<mask token>

<mask token>
with open(filename) as f:
    lines = f.readlines()
<mask token>
for input_line in lines:
    readingCount += 1
    newVal = int(input_line)
    prevprevWindow = newVal + prevWindow
    prevWindow = newVal + curWindow
    curWindow = newVal
    if readingCount == 3:
        prevFullWindow = prevprevWindow
    elif readingCount > 3:
        if prevprevWindow > prevFullWindow:
            increases += 1
        prevFullWindow = prevprevWindow
print('Number of increases: ' + str(increases))

filename = '../../inputs/2021/day1-1.txt'
with open(filename) as f:
    lines = f.readlines()
prevValueRead = False
increases = 0
prevFullWindow = 0
prevprevWindow = 0
prevWindow = 0
curWindow = 0
readingCount = 0
for input_line in lines:
    readingCount += 1
    newVal = int(input_line)
    prevprevWindow = newVal + prevWindow
    prevWindow = newVal + curWindow
    curWindow = newVal
    if readingCount == 3:
        prevFullWindow = prevprevWindow
    elif readingCount > 3:
        if prevprevWindow > prevFullWindow:
            increases += 1
        prevFullWindow = prevprevWindow
print('Number of increases: ' + str(increases))

filename = "../../inputs/2021/day1-1.txt"
with open(filename) as f:
    lines = f.readlines()
prevValueRead = False
increases = 0
prevFullWindow=0
prevprevWindow=0
prevWindow=0
curWindow=0
readingCount=0

for input_line in lines:
    readingCount += 1
    newVal = int(input_line)
    prevprevWindow = newVal + prevWindow
    prevWindow = newVal + curWindow 
    curWindow = newVal
    if readingCount == 3:
        prevFullWindow = prevprevWindow
        #print("Window: "+str(prevFullWindow))
    elif readingCount > 3:
        if prevprevWindow > prevFullWindow :
            increases += 1
        prevFullWindow = prevprevWindow
        #print("Window: "+str(prevFullWindow))
 

print("Number of increases: "+str(increases))