$$left| S_{1}cup S_{2}ldots cup S_{n} ight|$$
$$=sum_{i} |S_i| - sum_{i<j} |S_{i_1}cap S_{i_2}| + sum_{i<j<k} |S_{i_1}cap S_{i_2}cap S_{i_2}| + dots + (-1)^{n-1}|S_{i_1}cap S_{i_2}cap dots cap S_{i_k}|$$