Paco had 40 cookies. He ate some of them and had 31 cookies left. How many cookies did Paco eat?
1. Paco had 40 cookies. 
2. He ate some of them. 
3. He had 31 cookies left. 

That means that Paco ate 9 cookies.