#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++)
#define rep(i,n)Rep(i,0,n)
typedef long long ll;
typedef long double ld;
#define M(x,y) ((x)>(y)?(x):(y))
#define m(x,y) ((x)<(y)?(x):(y))

int main() {
	ld a, b, n, max = 0;
	scanf("%lf %lf %lf", &a,&b,&n);
	Rep(i, 1, a + 1) {
		ll x = floorl(i * b / a);
		if (x > n) {
			if (i == 1)max = M(max, floorl(a * ((n / b) - floorl(n / b))));
			break;
		}
		max = M(max, floorl(a * ((x / b) - floorl(x / b))));
	}
	ll Max = max;
	printf("%lld", Max);
}