Good Will Hunting Math Problem - Search