from math import floor





def f(x, a, b):

    return floor((x * a) / b) - a * floor(x / b)





def main():

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

    if n < min(a, b):

        print((f(n, a, b)))

    elif min(a, b) <= n < max(a, b):

        print((max(f(min(a, b) - 1, a, b), f(n, a, b))))

    else:

        print((max(f(max(a, b) - 1, a, b), f(min(a, b) - 1, a, b))))





if __name__ == '__main__':

    main()



from math import floor





def main():

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

    

    def f(x):

        return floor((x * a) / b) - a * floor(x / b)

    

    print((f(min(n, b - 1))))





if __name__ == '__main__':

    main()



from math import floor


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


def main():
    a, b, n = list(map(int, input().split()))
    if n < min(a, b):
        print((f(n, a, b)))
    elif min(a, b) <= n < max(a, b):
        print((max(f(min(a, b) - 1, a, b), f(n, a, b))))
    else:
        print((max(f(max(a, b) - 1, a, b), f(min(a, b) - 1, a, b))))


if __name__ == "__main__":
    main()

from math import floor


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

    def f(x):
        return floor((x * a) / b) - a * floor(x / b)

    print((f(min(n, b - 1))))


if __name__ == "__main__":
    main()

- - -def f(x, a, b): -    return floor((x * a) / b) - a * floor(x / b) -    if n < min(a, b): -        print((f(n, a, b))) -    elif min(a, b) <= n < max(a, b): -        print((max(f(min(a, b) - 1, a, b), f(n, a, b)))) -    else: -        print((max(f(max(a, b) - 1, a, b), f(min(a, b) - 1, a, b)))) + +    def f(x): +        return floor((x * a) / b) - a * floor(x / b) + +    print((f(min(n, b - 1))))