{"raw_statement":[{"iden":"problem statement","content":"Given are integers $A$, $B$, and $N$.\nFind the maximum possible value of $floor(Ax/B) - A × floor(x/B)$ for a non-negative integer $x$ not greater than $N$.\nHere $floor(t)$ denotes the greatest integer not greater than the real number $t$."},{"iden":"constraints","content":"*   $1 ≤ A ≤ 10^{6}$\n*   $1 ≤ B ≤ 10^{12}$\n*   $1 ≤ N ≤ 10^{12}$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$ $B$ $N$"},{"iden":"sample input 1","content":"5 7 4"},{"iden":"sample output 1","content":"2\n\nWhen $x=3$, $floor(Ax/B)-A×floor(x/B) = floor(15/7) - 5×floor(3/7) = 2$. This is the maximum value possible."},{"iden":"sample input 2","content":"11 10 9"},{"iden":"sample output 2","content":"9"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}