In a class, 18 students have a red notebook, 15 students have a blue backpack, 7 students have both. How many students (at least) are there in the class?
With the formula, it gives $18+15-7=26$ students.