Adding all paths to certain sum.