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. Find the original number.