#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
typedef long long ll;

double f(double n1,double n2,double n3)
{
    double a,b,c;
    a=n1*n3/n2;
    a=floor(a);
    b=n3/n2;
    b=floor(b);
    b=n1*b;
    c=a-b;
    return c;
}


int main()
{

    double a,b,n,ans=0;
    scanf("%lf %lf %lf",&a,&b,&n);

    for(int i=1;i<=n;i++)
    {
        if(f(a,b,i)>ans)
        {
            ans=f(a,b,i);
        }
    }

    printf("%f\n",ans);

    return 0;
}