CodeEff/ECCO huggingface dataset:
# Original solution
A,B,N=list(map(int,input().split()))
C=A%B
ans=0
for i in range(1,min(B,N+1)):
    b=i
    ans=max(ans, (A*b-C*b%B)//B)
print(ans)

# Optimized solution
A,B,N=list(map(int,input().split()))
C=A%B
ans=0
b=min(B-1,N)
ans=(A*b-C*b%B)//B
print(ans)
# Original solution
A, B, N = list(map(int, input().split()))
c = 0
t = -10
if N > 100000000:
    for i in range(100000000, N + 1):
        a = (i * A) // B - A * (i // B)
        c = max(c, a)
        if t > a or i > 1100000000:
            print(c)
            break
        t = a
    else:
        print(c)
else:
    for i in range(N + 1):
        a = (i * A) // B - A * (i // B)
        c = max(c, a)
        if t > a or i > 100000000:
            print(c)
            break
        t = a
    else:
        print(c)


# Optimized solution
A, B, N = list(map(int, input().split()))
X = min(N, B - 1)
print((A * X // B - A * (X // B)))
# Original solution
a,b,n = list(map(int,input().split()))
ans = -10**10
for i in range(1,n+1):
    t = (a*i)//b
    f = i//b
    s = t-a*f
    if ans > s:
        break
    else:
        ans = s

print(ans)


# Optimized solution
a,b,n = list(map(int,input().split()))
ans = 0
if n >= b:
    ans = (a*(b-1))//b
else:
    ans = (a*n)//b
print(ans)
# Original solution
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

a,b,n = LI()
import math

ans = 0
for i in range(n+1):
    ans = max(ans, math.floor(a*i/b)-a*math.floor(i/b))
print(ans)

# Optimized solution
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

a,b,n = LI()

m = min(b-1, n)
print((int(a*m/b)-a*int(m/b)))
# Original solution
import sys


sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


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

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

    M = 0
    for i in range(N, max(0, N - 10 ** 7), -1):
        tmp = func(i)
        if tmp > M:
            M = tmp

    print(M)


if __name__ == "__main__":
    main()


# Optimized solution
import sys


sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


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

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

    print((func(min(N, B - 1))))


if __name__ == "__main__":
    main()
# Original solution
a, b, n = list(map(int, input().split()))
print((max([(a*i)//b - a*(i//b) for i in range(n + 1)])))

# Optimized solution
a, b, n = list(map(int, input().split()))
if n < b:
    k = n
else:
    k = b - 1
print(((a*k)//b - a*(k//b)))
# Original solution
from math import floor

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

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

result = 0
for x in range(min(A + 1, N + 1)):
    result = max(result, f(x))

if B > A:
    for i in range(10 ** 20):
        x = (i * B + A - 1) // A
        if x > N:
            break
        result = max(result, f(x))

print(result)


# Optimized solution
from math import floor

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

x = min(B - 1, N)
print((floor(A * x / B) - A * floor(x / B)))
# Original solution
import sys
import itertools
import collections
# X = int(input())
A, B, N = list(map(int, input().split()))

if B-1 < N:
	max_score = 0
	for x in range(B-1, N+1, B):
		score = int(A*x/B) - A * int(x/B)
		if max_score < score:
			max_score = score
	print(score)

else:
	print((int(A*N/B)))


# Optimized solution
import sys
import itertools
import collections
# X = int(input())
A, B, N = list(map(int, input().split()))
if B-1 < N:
	print((int(A*(B-1)/B)))
else:
	print((int(A*N/B)))
# Original solution
import math

def siki(A, B, X):
	return math.floor((A*X)/B) - A*math.floor(X/B)

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

if B > A * N:
	print((0))
else:
	if N < B:
		k = N
	else:
		k = B
	for i in range(1, k+1):
		if max_value < siki(A,B,i):
			max_value = siki(A,B,i)

	print(max_value)


# Optimized solution
import math

def f(A, B, X):
	return math.floor((A*X)/B) - A*math.floor(X/B)

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

if N < B:
	print((f(A,B,N)))
else:
	print((f(A,B,B-1)))
# Original solution
import math
import sys
input = sys.stdin.readline

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

ans = 0

for i in range(N + 1):
    t = math.floor(A * i / B) - A * math.floor(i / B)
    ans = max(ans, t)

print(ans)


# Optimized solution
import math
import sys
input = sys.stdin.readline

A, B, N = list(map(int, input().split()))
x = min(B-1, N)
print((math.floor(A*x/B) - A*math.floor(x/B)))
# Original solution
import math

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

ans = 0
for x in range(1, N+1):
    term1 = math.floor(A*x/B)
    term2 = A * math.floor(x/B)
    temp = term1 - term2

    # print("x: {}, temp: {}, term1: {}, term2: {}".format(x, temp, term1, term2))

    ans = max(ans, temp)

print(ans)


# Optimized solution
import math

DEBUG = False

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

if DEBUG:
    ans = 0
    for x in range(1, N+1):
        term1 = math.floor(A*x/B)
        term2 = A * math.floor(x/B)
        temp = term1 - term2
        print(("x: {}, temp: {}, term1: {}, term2: {}".format(x, temp, term1, term2)))
        ans = max(ans, temp)
    print(ans)

print((math.floor(A*min(B-1, N)/B)-A*math.floor(min(B-1, N)/B)))
# Original solution
def main():
    a, b, n = list(map(int, input().split()))
    ans = -10 ** 10

    if b - 1 <= n:
        x = b - 1
        ans = (a * x) // b - a * (x // b)
    else:
        for x in range(1, n + 1):
            ans = max(ans, (a * x) // b - a * (x // b))

    print(ans)


if __name__ == "__main__":
    main()


# Optimized solution
def f(a, b, x):
    return (a * x) // b - a * (x // b)


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

    if n < b - 1:
        x = n
    else:
        x = b - 1

    print((f(a, b, x)))


if __name__ == "__main__":
    main()
# Original solution
A,B,N = list(map(int,input().split()))

max = 0
for i in range(1,N+1):
    m = int(A*i/B)-A*int(i/B)
    if m>max:
        # print('i:', i)
        # print('m:', m)
        max = m
# print(max)

if N<B: m=N
else: m=B-1



l = int(A*m/B)-A*int(m/B)
print(l)

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

if N<B: m=N
else: m=B-1

l = int(A*m/B)-A*int(m/B)
print(l)
# Original solution
import sys
input = sys.stdin.readline

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

ans = 0

#bがnよりも大きい時
if b > n:
    ans = int(a*n/b)
    print(ans)
    exit()

#b==nのときは、終了間際の2個だけ比較する
elif b == n:
    for i in range(n-1,n+1):
        tmpans = int(a*i/b) - (a*int(i/b))
        if tmpans >= ans:
            ans = tmpans
    print(ans)
    exit()

#これ以外の時は、nはb値ごとにスキップする。
else:
    for i in range(1,n+1,b):
        tmpans = int(a*(i-2)/b) - (a*int((i-2)/b))
        if tmpans >= ans:
            ans = tmpans

print(ans)

# Optimized solution
import sys
input = sys.stdin.readline

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

ans = 0

#bがnよりも大きい時
if b > n:
    ans = int(a*n/b)
    print(ans)
    exit()

#b==nのときは、終了間際の2個だけ比較する
elif b == n:
    for i in range(n-1,n+1):
        tmpans = int(a*i/b) - (a*int(i/b))
        if tmpans >= ans:
            ans = tmpans
    print(ans)
    exit()

#これ以外の時は、nはb値ごとにスキップする。
else:
    for i in range(int(n/b),n+1,b):
        tmpans = int(a*(i-2)/b) - (a*int((i-2)/b))
        if tmpans >= ans:
            ans = tmpans

print(ans)
# Original solution
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

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

for i in range(1,min(b+1,n+1)):
    d = math.floor((a*i)/b)
    e = a*math.floor(i/b)
    if e>0:
        break
    ans = max(ans,d-e)
print(ans)

# Optimized solution
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

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

if n < b-1:
    ans = math.floor((a*n)/b)
else:
    ans = math.floor((a*(b-1))/b)
print(ans)
# Original solution
import sys
import itertools
import math

A,B,N = list(map(int, input().split()))
a = 0
for i in range(1,N+1):
    a = max(a, math.floor(A*i/B) - A * math.floor(i/B))

print(a)

# Optimized solution
import sys
import itertools
import math

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

i = min(B-1,N)


print((math.floor(A*i/B) - A * math.floor(i/B)))
# Original solution
import math

a, b, n = list(map(int, input().split()))
ans = math.floor(a*n/b) - a*math.floor(n/b)
x = b-1
while x <= n:
    ans = max(ans, math.floor(a*x/b) - a*math.floor(x/b))
    x += b
print(ans)

# Optimized solution
import math
a, b, n = list(map(int, input().split()))
x = min(b-1, n)
ans = math.floor(a*x/b) - a*math.floor(x/b)
print(ans)
# Original solution
a, b, n = list(map(int, input().split()))
p = 10**9+7
ans = 0
for x in range(n+1):
 c = (int((a*x)%p/b))%p
 d = (int(x/b))%p
 e = (c - a*d)%p
 ans = max(ans, e)
print(ans)

# Optimized solution
a, b, n = list(map(int, input().split()))
c = min(b-1, n)
print((int(a*c/b)))
# Original solution
import math
a,b,n=list(map(int,input().split()))
ans=0
for i in range(n):
  c=a*(i+1)//b-a*((i+1)//b)
  ans=max(c,ans)
print(ans)

# Optimized solution
a,b,n=list(map(int,input().split()))
print((a*min(n,b-1)//b-a*(min(b-1,n)//b)))
# Original solution
# coding: utf-8
# Your code here!
import math
line = list(map(int,input().split()))
A,B,N =line[0],line[1],line[2]

ans = (N+1)//B
if ans ==0:
    print((math.floor(A*N/B)-A*math.floor(N/B)))
else:
    start = (math.floor(A*N/B)-A*math.floor(N/B))
    for i in range(1,ans+1):
        x= i*B-1
        start = max((math.floor(A*x/B)-A*(i-1)),start)
    print(start)

# Optimized solution
# coding: utf-8
# Your code here!
def main():
    import sys
    line = sys.stdin.readline
    A,B,N = list(map(int,input().split()))
    if B>N:
        ans = A*N//B
    else:
        ans = A*(B-1)//B
    print(ans)

if __name__== "__main__":
    main()
# Original solution
import math
A,B,N=list(map(int,input().split()))
range_list=list(range(N+1))
max_value=0
for i in range(N+1):
    check_value=math.floor(A*i/B)-A*math.floor(i/B)
    if(max_value<=check_value):
        max_value=check_value
print(max_value)


# Optimized solution
A,B,N=list(map(int,input().split()))
if B<=N:
    print((int(A*(B-1)/B)-A*int((B-1)/B)))
else:
    print((int(A*(N)/B)-A*int(N/B)))
# Original solution
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    a, b, n = list(map(int, input().split()))

    ans = 0

    for x in range(min(b, n + 1)):
        ans = max(int(a * x / b) - a * int(x / b), ans)

    print(ans)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()


# Optimized solution
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    a, b, n = list(map(int, input().split()))

    ans = 0

    x = min(b - 1, n)
    ans = max(int(a * x / b) - a * int(x / b), ans)

    print(ans)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()
# Original solution
import math
a,b,n = list(map(int,input().split()))

x = 0
now = 0
result = 0

    

for i in range(n+1):
    if x > b:
        break
    x = i
    now = (((a * x)//b)) - (a * (x//b))
    #now = math.ceil(((a * x)/b)) - (a * math.ceil(x/b))
    #print("now=",now,"x=",x)
    #print(result,now)
    result = max(result,now)

print(result)
    



# Optimized solution

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

x = min(b-1,n)

print((((a * x)//b)) )
# Original solution

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

x = min(b-1,n)

print((((a * x)//b)) )


# Optimized solution

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

if b > n:
    x = n
else:
    x = b - 1


print((((a * x)//b)) )
# Original solution
ABN = input().split()
A = int(ABN[0])
B = int(ABN[1])
N = int(ABN[2])

answer = 0
temp = 0

for x in range(N+1):
    temp = (A*x)//B - A * (x//B)

    if answer < temp:
        answer = temp

print(answer)

# Optimized solution
ABN = input().split()
A = int(ABN[0])
B = int(ABN[1])
N = int(ABN[2])

answer = 0
temp = 0

if N >= B:
    answer = A*(B-1) // B - A * ((B-1)//B)

else:
    answer = A*N //B - A * (N//B)

print(answer)
# Original solution
import math
A,B,N = list(map(int, input().split()))


if(N < B):
  print((math.floor(A * N / B) - A * math.floor(N / B)))
else:
  print((math.floor(A * (B-1) / B) - A * math.floor((B-1) / B)))

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

x = min(N, B-1)

print((math.floor(A * x / B) - A * math.floor(x / B)))
# Original solution
import math
def formula(x):
    return math.floor(A*x/B)-(A*math.floor(x/B))
A,B,n=[int(x) for x in input().split()]
maxi=formula(1)
for i in range(2,n+1):
    maxi=max(formula(i),maxi)
print(maxi)

# Optimized solution
import math
def formula(x):
    return math.floor(A*x/B)-(A*math.floor(x/B))
A,B,n=[int(x) for x in input().split()]
if(n<=B-1):
    x=n
else:
    x=B-1
maxi = formula(x)
print(maxi)
# Original solution
def main():
    ans = 0
    a,b,n = list(map(int, input().split()))
    n = min(b-1, n)
    ans = (a*n)//b - a*(n//b)
    print(ans)

if __name__ == '__main__':
    main()

# Optimized solution
a,b,n = list(map(int, input().split()))
x = min(n, b-1)
ans = a*x//b - a*(x//b)
print(ans)
# Original solution
from sys import stdin
import sys

A, B, N = [int(x) for x in stdin.readline().rstrip().split()]
# N, M = [int(x) for x in stdin.readline().rstrip().split()]
# U = input().split()
ans = int((A*N)/B)-A*int(N/B)
if N >= B:
    n = int(N/B)
    for i in range(n):
        x = i*B
        temp = ans1 = int((A*(x-1))/B)-A*int((x-1)/B)
        if temp > ans:
            ans = temp
    n = n*B
    ans1 = int((A*(n-1))/B)-A*int((n-1)/B)
    ans3 = int((A*(n+1))/B)-A*int((n+1)/B)
    ans2 = int((A*(B-1))/B)-A*int((B-1)/B)
    ans4 = int((A*(B+1))/B)-A*int((B+1)/B)
    ans5 = int((A*(n))/B)-A*int((n)/B)
else:
    ans1 = ans
    ans2 = ans
    ans3 = ans
    ans4 = ans
    ans5 = ans


print((max(ans, ans1, ans2, ans3, ans4, ans5)))


# Optimized solution
from sys import stdin
import sys

A, B, N = [int(x) for x in stdin.readline().rstrip().split()]
# N, M = [int(x) for x in stdin.readline().rstrip().split()]
# U = input().split()
x=min(B-1,N)
ans = int((A*x)/B)-A*int(x/B)
print(ans)
# if N >= B:
# Original solution
from sys import stdin
 
A, B, N = [int(x) for x in stdin.readline().rstrip().split()]
 
ans1 = (A*N)//B-A*(N//B)
 
if B-1<=N:
	ans2 = (A*(B-1))//B
else:
  	ans2=0
 
print((max(ans1,ans2)))

# Optimized solution
from sys import stdin
 
A, B, N = [int(x) for x in stdin.readline().rstrip().split()]
 
ans1 = ((A*N)//B)-A*int(N/B)
 
if B-1<=N:
	ans2 = (A*(B-1))//B
else:
  	ans2=0
 
print((max(ans1,ans2)))
# Original solution
A, B ,N = list(map(int, input().split()))

x = [i+1 for i in range(N)]

gokei = []
for a in x:
  #floor(Ax/B)
  floor1 = int((A*a)/B)
  floor2 = int(a/B)
  test = floor1 - A * floor2
  gokei.append(test)

gokei.sort(reverse=True)
print((gokei[0]))

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

#x = [i+1 for i in range(N)]

gokei = [int((A*(a+1))/B) - A*int((a+1)/B) for a in range(N)]
"""
for a in x:
  #floor(Ax/B)
  floor1 = int((A*a)/B)
  floor2 = int(a/B)
  test = floor1 - A * floor2
  gokei.append(test)
"""
gokei.sort(reverse=True)
print((gokei[0]))
# Original solution
A, B, N = list(map(int,input().split()))

max = -1
for x in range(N+1):
  tmp = int(A*x/B) - A*int(x/B)
  if tmp >= max:
    max = tmp

print(max)


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

if N <= B-1:
  max = int(A*N/B) - A*int(N/B)
else:
  max = int(A*(B-1)/B) - A*int((B-1)/B)

print(max)
# Original solution
import math

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

for i in reversed(list(range(b))):
    if i<=n:
        print((math.floor(a*i/b)))
        break



# Optimized solution
import math

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

# for i in reversed(range(b)):
#     if i<=n:
#         print(math.floor(a*i/b))
#         break

if b <= n:
    print((math.floor(a*(b-1)/b)))
else:
    print((math.floor(a*n/b)))
# Original solution
a,b,n = list(map(int, input().split()))
fnc = lambda x: int(a*x/b) - a*int(x/b)
prev = 0
for i in range(n+1):
    now = fnc(i)
    if prev > now:
        print(prev)
        break
    elif i == n:
        print(now)
        break
    prev = now

# Optimized solution
a,b,n = list(map(int, input().split()))
if n < b:
    print((int(a/b * n)))
else:
    print((int(a/b * (b-1))))
# Original solution
# -*- coding: utf-8 -*-
# モジュールのインポート
import math

# 標準入力の取得
A, B, N = list(map(int, input().split()))


def func(x: int) -> int:
    """目的関数

    Arguments:
        x {int} -- N以下の非負整数

    Returns:
        int -- 目的関数値
    """
    x_B = x / B
    return math.floor(A*x_B) - A*math.floor(x_B)


# 求解処理
result = 0
for x in range(min(N, B-1), N+1, B):
    result = max(result, func(x))

# 結果出力
print(result)


# Optimized solution
# -*- coding: utf-8 -*-
# モジュールのインポート
import math

# 標準入力の取得
A, B, N = list(map(int, input().split()))


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


# 求解処理
result = f(min(B-1, N))

# 結果出力
print(result)
# Original solution
A, B, N= list(map(int, input().split()))
max=0

for i in range(N):
    x=i+1
    a=(A*x)//B
    b=x//B
    f=a-A*b
    if max<f:
        max=f
print(max)


# Optimized solution
A,B,N=list(map(int,input().split()))
if N+1>=B:
    T=int(A*(B-1)/B)
    print(T)
else:
    T=int(A*N/B)
    print(T)
# Original solution
import math
A, B, N = list(map(int, input().split()))

def f(A, B, x):
  return math.floor((A * x) / B) - A * math.floor(x / B)

print((max([f(A, B, x) for x in range(1,min(N + 1, B + 1))])))

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

def f(A, B, x):
  return math.floor((A * x) / B) - A * math.floor(x / B)

x = N if N < B else B - 1
print((f(A, B, x)))
# Original solution
import math
ans=0
a,b,n=list(map(int,input().split()))

for i in range(n+1):
    keep=math.floor(a*i/b)-a*math.floor(i/b)
    if ans<keep:
        ans=keep
print(ans)

# Optimized solution
import math
ans=-100000000
a,b,n=list(map(int,input().split()))
i=min(n,b-1)
keep=math.floor(a*i/b)-a*math.floor(i/b)

print(keep)
# Original solution
a, b, n = list(map(int, input().split()))
ans_list = []
for x in range(n+1):
    new_ans = int(a*x/b) - int(x/b) * a
    ans_list.append(new_ans)
print((max(ans_list)))

# Optimized solution
a, b, n = list(map(int, input().split()))
ans = min(b-1, n)
print((int(a*ans/b)-a*int(ans/b)))
# Original solution
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list([int(x)-1 for x in input().split()])
def II(): return int(eval(input()))
def IF(): return float(eval(input()))
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

#solve
def solve():
    a, b, n = LI()
    print((min(b - 1, n) * a // b))
    return


#main
if __name__ == '__main__':
    solve()


# Optimized solution
a,b,n=list(map(int,input().split()))
def f(x):
    return a*x//b-a*(x//b)
if n<b:
    ans =f(n)
else:
    t = n
    u = b - 1
    ans=max(f(t),f(u))
print(ans)
# Original solution
a, b, n = list(map(int, input().split()))
if a == 1 or b == 1:
    print((0))
else:
    ans = 0
    prev = 0
    for x in range(n+1):
        tmp = (a*x)//b - a*(x//b)
        if prev > 0 and tmp == 0:
            ans = prev
            break
        prev = tmp
    else:
        ans = prev
    print(ans)

# Optimized solution
a, b, n = list(map(int, input().split()))
print(((a*min(b-1,n))//b))
# Original solution
a, b, n = list(map(int, input().split()))
ans = [int(a * x / b) - a * int(x / b) for x in range(n+1)]
print((max(ans)))


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

x = min(B-1, N)
print((A*x // B - A * (x//B)))
# Original solution
import math
def main():
    A,B,N = list(map(int, input().split()))

    max1 = 0
    k1 = math.ceil(B/A)
    k2 = B+1 if B<N else N+1
    for x in range(k1,k2):
        tmp = int(A*x/B) - A*int(x/B)
        max1 = max(max1,tmp)
    print(max1)

main()


# Optimized solution
def main():
    A,B,N = list(map(int, input().split()))

    x = min(B-1,N)
    max1 = int(A*x/B) - A*int(x/B)
    print(max1)

main()
# Original solution
def fx(x):
    return (a*x // b) - a * (x//b)

a,b,n = [int(x) for x in input().split()]

if(n < b):
    print((fx(n)))
else:
    print((fx((n//b)*b -1)))


# Optimized solution
def fx(x):
    return (a*x // b) - a * (x//b)

a,b,n = [int(x) for x in input().split()]

if(n < b):
    print((fx(n)))
else:
    print((fx(b -1)))
# Original solution
A,B,N = list(map(int,input().split()))
score = 0
for i in range(N+1):
    temp = int(A*i/B)-A*int(i/B)
    score = max(temp, score)
print(score)

# Optimized solution
A,B,N = list(map(int,input().split()))
score = 0
if N>=B:
    x = B-1
else:
    x = N

score = int(A*x/B)-A*int(x/B)
print(score)
# Original solution
a, b, n = list(map(int, input().split()))

Max = 0
for x in range(1, n + 1):
    Max = max(Max, (a * x) // b - a * (x // b))
print(Max)


# Optimized solution
def f(a, b, n):
    if b == 1:
        print((0))
    else:
        Max = 0
        step = 1 if b // a ==  0 else b // a
        for x in range(b // a, n + step, step):
            res = (a * x) // b - a * (x // b)
            if res > Max:
                Max = res
        print(Max)

a, b, n = list(map(int, input().split())); f(a, b, n)
# Original solution
A,B,N= list(map(int,input().split()))
floor_num=[]

if N >=B:
    floor_num.append(int(A*(B-1)/B))
else:  
    for x in range(0,N+1):

        floor_num.append(int(A*x/B)-A*int(x/B))


print((max(floor_num)))



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


floor_num=[]

if N >=B:
    floor_num.append(int(A*(B-1)/B))
else:  

        floor_num.append(int(A*N/B))


print((max(floor_num)))
# Original solution
import math

def input_number():
    return int(eval(input()))

def input_1line_list(number_of_input):
    return [eval(input()) for i in range(number_of_input)]

def input_1line():
    return list(map(int, input().split()))

# def print_unique_length(input_list):
#     print(len(set(input_list)))

def main():
    a, b, n = input_1line()
    ans = 0
    for i in range(n+1):
        ans = max(ans, math.floor(a*i/b) - a*math.floor(i/b))
    print(ans)

if __name__ == '__main__':
    main()

# Optimized solution
import math

def input_number():
    return int(eval(input()))

def input_1line_list(number_of_input):
    return [eval(input()) for i in range(number_of_input)]

def input_1line():
    return list(map(int, input().split()))

# def print_unique_length(input_list):
#     print(len(set(input_list)))

def f(a, b, x):
    return (a*(x%b))//b 

def main():
    a, b, n = input_1line()
    x = min(b-1, n)
    ans = f(a, b, x)
    print(ans)

if __name__ == '__main__':
    main()