Below is an instruction that describes a task. Write a response that appropriately completes the request in English. Please answer in English.

### Instruction:
Maurice had only been horseback riding a handful of times in his life. His best friend, Matt, goes horseback riding regularly. When Maurice went to visit Matt for two weeks, he rode another 8 times. Each time, Matt went with him. Meanwhile, besides the times that Matt accompanied Maurice, he rode an additional 16 times. If the total number of times Matt rode during that two weeks is three times the number of times Maurice had ridden before his visit, how many times had Maurice been horseback riding before visiting Matt?

### Response:
Let x = the number of times Maurice had been horseback riding before visiting Matt.
Maurice rode 8 times during his visit and Matt rode 8 + 16 = 24 times during Maurice's visit.
If the total number of times Matt rode during that two weeks is three times the number of times Maurice had ridden before his visit, then 24 = 3x.
Dividing both sides by 3, we get x = 8.
Maurice had been horseback riding 8 times before visiting Matt.
#### 8

