A, B, N = list(map(int,input().split()))

import math



x3 = min(N,B-1)

def f(x): 

    t = math.floor((A*x)/B) - A * math.floor(x/B)

    return int(t)

print((f(x3)))
A, B, N = list(map(int,input().split()))

import math

x1 = N

x2 = min(N,B-1)

def f(x): 

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

print((max(f(x1),f(x2))))
A, B, N = list(map(int, input().split()))
import math

x3 = min(N, B - 1)


def f(x):
    t = math.floor((A * x) / B) - A * math.floor(x / B)
    return int(t)


print((f(x3)))

A, B, N = list(map(int, input().split()))
import math

x1 = N
x2 = min(N, B - 1)


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


print((max(f(x1), f(x2))))

-x3 = min(N, B - 1) +x1 = N +x2 = min(N, B - 1) -    t = math.floor((A * x) / B) - A * math.floor(x / B) -    return int(t) +    return A * x // B - A * (x // B) -print((f(x3))) +print((max(f(x1), f(x2))))