I have a question regarding mods and Fermat's Little Theorem. I know Fermat's little theorem states that a^p-1 congruent to 1 (mod p). Also, i know that for every interger a we have that a^p congruent to a (mod p). So, my question is: What is the answer for 3^302 (mod 5)? Would it be 3^301 congruent 1 (mod 5)? I am having a bit of difficulty understanding this concept. Any help?