Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]

if N < B:
    a = int(A * N / B)
    b = A * int(N / B)
    print(a - b)
    exit(0)

ans = 0
before_ans = 0
for i in range(1, N + 1):
    a = int(A * i / B)
    b = A * int(i / B)
    ans = max(ans, a - b)
    if before_ans > a - b:
        break
    if ans == min(A - 1, B - 1):
        break
    before_ans = a - b
print(ans)

Fixed submission:
A, B, N = map(int, input().split())


# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]
def solve(i):
    a = int(A * i / B)
    b = A * int(i / B)
    return a - b


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

Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]

if N < B:
    a = int(A * N / B)
    b = A * int(N / B)
    print(a - b)
    exit(0)

ans = 0
before_ans = 0
for i in range(1, N + 1):
    a = int(A * i / B)
    b = A * int(i / B)
    ans = max(ans, a - b)
    if before_ans > a - b:
        break
    if ans == min(A - 1, B - 1):
        break
    before_ans = a - b
print(ans)

Fixed submission:
A, B, N = map(int, input().split())


# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]
def solve(i):
    a = int(A * i / B)
    b = A * int(i / B)
    return a - b


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

Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]

if N < B:
    a = int(A * N / B)
    b = A * int(N / B)
    print(a - b)
    exit(0)

ans = 0
before_ans = 0
for i in range(1, N + 1):
    a = int(A * i / B)
    b = A * int(i / B)
    ans = max(ans, a - b)
    if before_ans > a - b:
        break
    # if ans == min(A - 1, B - 1):
    #    break
    before_ans = a - b
print(ans)


Fixed submission:
A, B, N = map(int, input().split())


# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]
def solve(i):
    a = int(A * i / B)
    b = A * int(i / B)
    return a - b


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

Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]


ans = 0
before_ans = 0
for i in range(1, N + 1):
    a = int(A * i / B)
    b = A * int(i / B)
    ans = max(ans, a - b)
    #print(i, ans)
    if before_ans > ans:
        break
    if ans == min(A - 1, B - 1):
        break
    before_ans = a - b
print(ans)

Fixed submission:
A, B, N = map(int, input().split())


# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]
def solve(i):
    a = int(A * i / B)
    b = A * int(i / B)
    return a - b


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

Buggy python submission (verdict: Time Limit Exceeded):
A, B, N = map(int, input().split())
# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]


ans = 0
before_ans = 0
for i in range(1, N + 1):
    a = int(A * i / B)
    b = A * int(i / B)
    ans = max(ans, a - b)
    #print(i, ans)
    if before_ans > ans:
        break
    if ans == min(A - 1, B - 1):
        break
    before_ans = a - b
print(ans)

Fixed submission:
A, B, N = map(int, input().split())


# S = input()
# X1_list = [int(input()) for i in range(N)]
# X2_list = [list(map(int,input().split())) for i in range(N)]
def solve(i):
    a = int(A * i / B)
    b = A * int(i / B)
    return a - b


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