import re
import os
os.getcwd()
os.chdir("C:\\Users\\Jarrod\\Documents\\Python Scripts")
file = open("countnumbers.txt")
numbers = list()
num = list()
for line in file:
line = line.rstrip()
match = re.findall('([0-9]+)', line)
if len(match) == 0: continue
for i in match:
num.append(int(i))
print sum(num)