Let $z$ be a complex number such that $z^{23} = 1$ and $z \neq 1.$  Find
\[\sum_{n = 0}^{22} \frac{1}{1 + z^n + z^{2n}}.\]The answer is in the form rac{m}{n}, where gcd(m, n) = 1. Please provide the value of m + n.

Let's think step by step and output the final answer within \boxed{}.
user