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

### Instruction:
Anna has 3 times as many toys as Mandy and 2 fewer toys than Amanda. If they have 142 toys all together, how many toys does Mandy have?

### Response:
Let x be the number of toys Mandy has.
Anna has 3*x toys.
Amanda has 3*x+2 toys.
x+3*x+3*x+2=142
7*x+2=142
7*x=140
x=<<20=20>>20
#### 20