Subtract the number that flew in from the total at the end:
24 - 17 = 7
Now add the number that flew away to that:
15 + 7 = 22
There were 22 ducks.
9.5m questions
12.2m answers