Let S be the set of all real numbers a such that the function (x^2+5x+a)/(x^2-10x-24) can be expressed as the quotient of two linear functions. What is the sum of the elements of S?