Cindy was asked by her teacher to subtract 3 from a certain number and then divide the result by 9. ​Instead, she subtracted 9 and then divided the result by 3​, giving an answer of 31. What would her answer have been if she had worked the problem​ correctly?