Buggy python submission (verdict: Time Limit Exceeded):
a,b,n=map(int,input().split())
'''
lst=[]
for i in range(n+1):
    now=int(a*i/b)-a*int(i/b)
    lst.append(now)
print(max(lst))
'''
now=0
if n>=b:
    if n//b>=500000:
        ans=int(a*(n-1)/b)-a*int((n-1)/b)
        ans2=int(a*n/b)-a*int(n/b)
        for i in range(0,n//b+1,20000):
            ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
            now=max(now,ans3)
        print(max(ans,ans2,now))
        exit()
    ans=int(a*(n-1)/b)-a*int((n-1)/b)
    ans2=int(a*n/b)-a*int(n/b)
    for i in range(n//b+1):
        ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
        now=max(now,ans3)
    print(max(ans,ans2,now))

else:
    ans=int(a*(n)/b)-a*int((n)/b)
    print(max(ans,0))

Fixed submission:
a,b,n=map(int,input().split())
def ans(x):
    return int(a*x/b)
print(ans(min(n,b-1)))

Buggy python submission (verdict: Time Limit Exceeded):
a,b,n=map(int,input().split())
'''
lst=[]
for i in range(n+1):
    now=int(a*i/b)-a*int(i/b)
    lst.append(now)
print(max(lst))
'''
now=0
if n>=b:
    if n//b>=500000:
        ans=int(a*(n-1)/b)-a*int((n-1)/b)
        ans2=int(a*n/b)-a*int(n/b)
        for i in range(0,n//b+1,10000):
            ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
            now=max(now,ans3)
        print(max(ans,ans2,now))
        exit()
    ans=int(a*(n-1)/b)-a*int((n-1)/b)
    ans2=int(a*n/b)-a*int(n/b)
    for i in range(n//b+1):
        ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
        now=max(now,ans3)
    print(max(ans,ans2,now))

else:
    ans=int(a*(n)/b)-a*int((n)/b)
    print(max(ans,0))

Fixed submission:
a,b,n=map(int,input().split())
def ans(x):
    return int(a*x/b)
print(ans(min(n,b-1)))

Buggy python submission (verdict: Time Limit Exceeded):
a,b,n=map(int,input().split())
'''
lst=[]
for i in range(n+1):
    now=int(a*i/b)-a*int(i/b)
    lst.append(now)
print(max(lst))
'''
now=0
if n>=b:
    if n//b>=500000:
        ans=int(a*(n-1)/b)-a*int((n-1)/b)
        ans2=int(a*n/b)-a*int(n/b)
        for i in range(0,n//b+1,1000):
            ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
            now=max(now,ans3)
        print(max(ans,ans2,now))
        exit()
    ans=int(a*(n-1)/b)-a*int((n-1)/b)
    ans2=int(a*n/b)-a*int(n/b)
    for i in range(n//b+1):
        ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
        now=max(now,ans3)
    print(max(ans,ans2,now))

else:
    ans=int(a*(n)/b)-a*int((n)/b)
    print(max(ans,0))

Fixed submission:
a,b,n=map(int,input().split())
def ans(x):
    return int(a*x/b)
print(ans(min(n,b-1)))

Buggy python submission (verdict: Time Limit Exceeded):
a,b,n=map(int,input().split())
'''
lst=[]
for i in range(n+1):
    now=int(a*i/b)-a*int(i/b)
    lst.append(now)
print(max(lst))
'''
now=0
if n>=b:
    if n//b>=500000:
        ans=int(a*(n-1)/b)-a*int((n-1)/b)
        ans2=int(a*n/b)-a*int(n/b)
        for i in range(0,n//b+1,10):
            ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
            now=max(now,ans3)
        print(max(ans,ans2,now))
        exit()
    ans=int(a*(n-1)/b)-a*int((n-1)/b)
    ans2=int(a*n/b)-a*int(n/b)
    for i in range(n//b+1):
        ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
        now=max(now,ans3)
    print(max(ans,ans2,now))

else:
    ans=int(a*(n)/b)-a*int((n)/b)
    print(max(ans,0))

Fixed submission:
a,b,n=map(int,input().split())
def ans(x):
    return int(a*x/b)
print(ans(min(n,b-1)))

Buggy python submission (verdict: Time Limit Exceeded):
a,b,n=map(int,input().split())
'''
lst=[]
for i in range(n+1):
    now=int(a*i/b)-a*int(i/b)
    lst.append(now)
print(max(lst))
'''
now=0
if n>=b:
    ans=int(a*(n-1)/b)-a*int((n-1)/b)
    ans2=int(a*n/b)-a*int(n/b)
    for i in range(n//b+1):
        ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
        now=max(now,ans3)
    print(max(ans,ans2,now))

else:
    ans=int(a*(n)/b)-a*int((n)/b)
    print(max(ans,0))

Fixed submission:
a,b,n=map(int,input().split())
def ans(x):
    return int(a*x/b)
print(ans(min(n,b-1)))

Buggy python submission (verdict: Runtime Error):
a,b,n=map(int,input().split())
'''
lst=[]
for i in range(n+1):
    now=int(a*i/b)-a*int(i/b)
    lst.append(now)
print(max(lst))
'''
lst=[]
if n>=b:
    ans=int(a*(n-1)/b)-a*int((n-1)/b)
    ans2=int(a*n/b)-a*int(n/b)

    print(max(ans,ans2,max(lst)))

else:
    ans=int(a*(n)/b)-a*int((n)/b)
    print(max(ans,0))


Fixed submission:
a,b,n=map(int,input().split())
def ans(x):
    return int(a*x/b)
print(ans(min(n,b-1)))

Buggy python submission (verdict: Time Limit Exceeded):
a,b,n=map(int,input().split())
'''
lst=[]
for i in range(n+1):
    now=int(a*i/b)-a*int(i/b)
    lst.append(now)
print(max(lst))
'''
lst=[]
if n>=b:
    ans=int(a*(n-1)/b)-a*int((n-1)/b)
    ans2=int(a*n/b)-a*int(n/b)
    for i in range(n//b+1):
        ans3=int(a*(i*b-1)/b)-a*int((i*b-1)/b)
        lst.append(ans3)
    print(max(ans,ans2,max(lst)))

else:
    ans=int(a*(n)/b)-a*int((n)/b)
    print(max(ans,0))

Fixed submission:
a,b,n=map(int,input().split())
def ans(x):
    return int(a*x/b)
print(ans(min(n,b-1)))