P10446 64-bit Integer Multiplication.

Description

Find the value of $a$ multiplied by $b$ modulo $p$.

Input Format

The first line contains an integer $a$, the second line contains an integer $b$, and the third line contains an integer $p$.

Output Format

Output one integer, representing the value of `a*b mod p`.

Explanation/Hint

$1 \le a,b,p \le 10^{18}$ Translated by ChatGPT 5