Modular Exponentiation?



I'm sorry if this is the wrong place to post this, but I wondered if
someone could verify if this statement is true or false:

(X^Y) mod N = (((((X mod N) * X) mod N) * X) mod N) * ... caried out Y
times.

This seems to make sense intuitively, but I have not been able to prove
it. This is probably due to my lack of experience more than anything.

Any help is appreciated. Thanks!

- James

.