#!/usr/bin/env python

# -*- coding: utf-8 -*-



a, b, n = list(map(int, input().split()))





def f(x):

    return a*x//b-a*(x//b)



high = n

low = 0

while high - low >= 1:

    mid_left = high/3+low*2/3

    mid_right = high*2/3+low/3

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

        low = mid_left

    else:

        high = mid_right

print((max(f(int(low)),f(int(high)))))

#!/usr/bin/env python

# -*- coding: utf-8 -*-

 

a, b, n = list(map(int, input().split()))

 

if n >= b:

    x = b-1

else:

    x = n

 

print((a*x//b-a*(x//b)))
#!/usr/bin/env python
# -*- coding: utf-8 -*-
a, b, n = list(map(int, input().split()))


def f(x):
    return a * x // b - a * (x // b)


high = n
low = 0
while high - low >= 1:
    mid_left = high / 3 + low * 2 / 3
    mid_right = high * 2 / 3 + low / 3
    if f(mid_left) <= f(mid_right):
        low = mid_left
    else:
        high = mid_right
print((max(f(int(low)), f(int(high)))))

#!/usr/bin/env python
# -*- coding: utf-8 -*-
a, b, n = list(map(int, input().split()))
if n >= b:
    x = b - 1
else:
    x = n
print((a * x // b - a * (x // b)))

- - -def f(x): -    return a * x // b - a * (x // b) - - -high = n -low = 0 -while high - low >= 1: -    mid_left = high / 3 + low * 2 / 3 -    mid_right = high * 2 / 3 + low / 3 -    if f(mid_left) <= f(mid_right): -        low = mid_left -    else: -        high = mid_right -print((max(f(int(low)), f(int(high))))) +if n >= b: +    x = b - 1 +else: +    x = n +print((a * x // b - a * (x // b)))