Let
\[\mathbf{M} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\]be a matrix with real entries such that $\mathbf{M}^3 = \mathbf{I}.$  Enter all possible values of $a + d,$ separated by commas.
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Let
\[\mathbf{M} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\]be a matrix with real entries such that $\mathbf{M}^3 = \mathbf{I}.$  Enter all possible values of $a + d,$ separated by commas.
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
2, -1
Let
\[\mathbf{M} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\]be a matrix with real entries such that $\mathbf{M}^3 = \mathbf{I}.$  Enter all possible values of $a + d,$ separated by commas.
train