A Combinatorial Application of the Maximal Ergodic Theorem