Principle of inclusion-exclusion