working brute force algorthm but the input is a not correct. Must change input to read line of data with the last number on that line being the correct answer