Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    for i in range(b,n+1):
        s2=math.floor(a*((1/b)-i//b))
        if max<s2:
            max=s2

print(max)

Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Runtime Error):
import math
a,b,n=map(int,input().split())
max=-2
if b<n:
    n=b
"""for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        s=math.floor(a*((1/b)-i//b))
    if s>max:
        max=s"""
        max=math.floor(a*n-1/b)
print(max)


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
if b<n:
    n=b
for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        s=math.floor(a*((1/b)-i//b))
    if s>max:
        max=s
print(max)


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
if b<n:
    n=b
for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        s=math.floor(a*((1/b)-i//b))
    if s>max:
        max=s
print(max)


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
if b<n:
    n=b
for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        p=i//b
        q=i/b-p
        z=q*a
        s=math.floor(a*((1/b)-i//b))
    if s>max:
        max=s
print(max)

Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
if b<n:
    n=b
for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        p=i//b
        q=i/b-p
        z=q*a
        s=math.floor(z)
    if s>max:
        max=s
print(max)


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
if b<n:
    n=b
for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        p=i//b
        q=i/b-p
        z=q*a
        s=math.floor(z)
    if s>max:
        max=s
print(max)


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
if b<n:
    n=b
for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        p=i//b
        q=i/b-p
        z=q*a
        s=math.floor(z)
    if s>max:
        max=s
print(int(max))


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Runtime Error):
import math
a,b,n=map(int,input().split())
max=-2
if b<n:
    n=b
for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    if s>max:
        max=s
print(int(max))


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
for i in range(1,n+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        s=math.floor(a*i/b)-a*math.floor(i/b)
    if s>max:
        max=s
print(int(max))


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Runtime Error):
import math
a,b,n=map(int,input().split())
max=-2
lim=min(n,b)
for i in range(1,lim+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        s=math.floor(a*i/b)-a*floor(i/b)
    if s>max:
        max=s
print(int(max))

Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Runtime Error):
import math
a,b,n=map(int,input().split())
max=-2
lim=min(n,b)
for i in range(1,lim+1):
    if i<b:
        s=math.floor(a*i/b)
    else:
        s=math.floor(a*i/b)-a*floor(i/b)
    if s>max:
        max=s
print(int(max))

Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
lim=min(n,b)
for i in range(1,lim+1):
    s=math.floor(a*i/b)-a*math.floor(i/b)
    if s>max:
        max=s
print(int(max))


Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
for i in range(1,n+1):
    s=math.floor(a*i/b)-a*math.floor(i/b)
    if s>max:
        max=s
print(int(max))

Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)

Buggy python submission (verdict: Time Limit Exceeded):
import math
a,b,n=map(int,input().split())
max=-2
for i in range(1,n+1):

    s=math.floor(a*i/b)-a*math.floor(i/b)
    if s>max:
        max=s
    if max==a/b:
        continue
print(max)

Fixed submission:
import math
a,b,n=map(int,input().split())
max=-2
if n<b:
    max=math.floor(a*n/b)
else:
    #b<=n
    max=math.floor(a*(b-1)/b)
    

print(max)