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



X = N

Y = min(B-1,N)



out1 = int(A*X/B) - A*int(X/B)

out2 = int(A*Y/B) - A*int(Y/B)

print(out2)

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

 

X = N

Y = min(B-1,N)

 

out1 = A*X//B - A*(X//B)

out2 = A*Y//B - A*(Y//B)

print((max(out1,out2)))
[A, B, N] = list(map(int, input().split()))
X = N
Y = min(B - 1, N)
out1 = int(A * X / B) - A * int(X / B)
out2 = int(A * Y / B) - A * int(Y / B)
print(out2)

[A, B, N] = list(map(int, input().split()))
X = N
Y = min(B - 1, N)
out1 = A * X // B - A * (X // B)
out2 = A * Y // B - A * (Y // B)
print((max(out1, out2)))

-out1 = int(A * X / B) - A * int(X / B) -out2 = int(A * Y / B) - A * int(Y / B) -print(out2) +out1 = A * X // B - A * (X // B) +out2 = A * Y // B - A * (Y // B) +print((max(out1, out2)))