In the first row, there are now 24 – 3 = <<24-3=21>>21 people.

In the second row, there are now 20 – 5 = <<20-5=15>>15 people.

So in total there are 21 in the first row + 15 in the second row + 18 in the third row = <<21+15+18=54>>54 people.

# Answer

54
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
There are 3 rows of people relaxing at the beach. The first row is made up of 24 people until 3 people get up to wade in the water. 5 people from the second row, which originally held 20 people, go to join them. The third row is made up of 18 people. How many people are left relaxing on the beach?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
54
There are 3 rows of people relaxing at the beach. The first row is made up of 24 people until 3 people get up to wade in the water. 5 people from the second row, which originally held 20 people, go to join them. The third row is made up of 18 people. How many people are left relaxing on the beach?
train