__author__ = 'saintdragon2'


fname = 'C:/github/python-3-lecture-2015/gui_practice/test_file.txt'

f = open(fname)

sum = 0

while True:
    line = f.readline()

    if not line:
        break

    sum += int(line)

print(sum)

f.close()