Well, I could see that but was not smart enough to re-invent Inclusion-Exclusion Principle. However, after I learned about that principle, the problem became fairly simple. First, we'll get (basic combinatorics from High School curriculum has been omitted for the sake of the beauty of the final...