Problems
Modular Exponentiation
Modular Exponentiation
Three positive integers $x, n$ and $m$ are given. Find the value of $x^n~mod~m$.
\InputFile
Three positive integers $x, n, m~(1 \le x, m \le 10^9, 2 \le n \le 10^7)$.
\OutputFile
Find and print the value of $x^n~mod~m$.
Input example #1
2 3 100
Output example #1
8