Sets A and B, shown in the Venn diagram, have the same number of elements. Their union has 2007 elements and their intersection has 1001 elements. Find the number of elements in A.
Let the element in A be x, then by the inclusion-exclusion principle we have x+x−1001=2007⟹x=1504