Answer:
45
Explanation:
3 students have both cats and dogs, so we will subtract 3 from the number of students who have cats and 3 from the number of students who have dogs because they shouldn't be surveyed multiple times.
This way, there are 20 students with cats, 17 students with dogs, 3 students with both, and 5 students with neither.
20+17+3+5=45