import sys

import math

from pprint import pprint



A, B, N = list(map(int, sys.stdin.readline().strip().split()))



def func(x):

    # return math.floor(A*x/B) - A*math.floor(x/B)

    return A*x//B - A*(x//B)





right = N

left = 0

while right - left > 5:

    mid_left = right//3+left*2//3

    mid_right = right*2//3+left//3

    # print("mid", mid_left, mid_right)

    #if mid_left == mid_right:

    #    break

    # print("func", func(mid_left), func(mid_right))

    if func(mid_left) <= func(mid_right):

        left = mid_left

    else:

        right = mid_right

    # print("lr", left, right)



ans = -1 * float("inf")

for i in range(left, right+1):

    # print(i, func(i))

    ans = max(ans, func(i))

print(ans)
import sys

import math

from pprint import pprint

 

A, B, N = list(map(int, sys.stdin.readline().strip().split()))

 

def func(x):

    return A*x//B - A*(x//B)

 

 

right = N

left = 0

while right - left > 5:

    mid_left = right//3+left*2//3

    mid_right = right*2//3+left//3

    # print("mid", mid_left, mid_right)

    if mid_left == mid_right:

        break

    # print("func", func(mid_left), func(mid_right))

    if func(mid_left) <= func(mid_right):

        left = mid_left

    else:

        right = mid_right

    # print("lr", left, right)

 

ans = -1 * float("inf")

for i in range(left, right+1):

    # print(i, func(i))

    ans = max(ans, func(i))

print(ans)
import sys
import math
from pprint import pprint

A, B, N = list(map(int, sys.stdin.readline().strip().split()))


def func(x):
    # return math.floor(A*x/B) - A*math.floor(x/B)
    return A * x // B - A * (x // B)


right = N
left = 0
while right - left > 5:
    mid_left = right // 3 + left * 2 // 3
    mid_right = right * 2 // 3 + left // 3
    # print("mid", mid_left, mid_right)
    # if mid_left == mid_right:
    #    break
    # print("func", func(mid_left), func(mid_right))
    if func(mid_left) <= func(mid_right):
        left = mid_left
    else:
        right = mid_right
    # print("lr", left, right)
ans = -1 * float("inf")
for i in range(left, right + 1):
    # print(i, func(i))
    ans = max(ans, func(i))
print(ans)

import sys
import math
from pprint import pprint

A, B, N = list(map(int, sys.stdin.readline().strip().split()))


def func(x):
    return A * x // B - A * (x // B)


right = N
left = 0
while right - left > 5:
    mid_left = right // 3 + left * 2 // 3
    mid_right = right * 2 // 3 + left // 3
    # print("mid", mid_left, mid_right)
    if mid_left == mid_right:
        break
    # print("func", func(mid_left), func(mid_right))
    if func(mid_left) <= func(mid_right):
        left = mid_left
    else:
        right = mid_right
    # print("lr", left, right)
ans = -1 * float("inf")
for i in range(left, right + 1):
    # print(i, func(i))
    ans = max(ans, func(i))
print(ans)

-    # return math.floor(A*x/B) - A*math.floor(x/B) -    # if mid_left == mid_right: -    #    break +    if mid_left == mid_right: +        break