A number is doubled, and then seven is added. When the result is divided by forty, the quotient is two and the remainder is thirty-three. What is the original number?