#include<stdio.h>
int main()
{
    unsigned long long int A,B,N,x=1,W,floor1,floor2;
    scanf("%llu",&A);
    scanf("%llu",&B);
    scanf("%llu",&N);
    while(x<=N)
    {

       floor1=(A*x)/B;
       floor2=(x/B);
       W=floor1-(5*floor2);
       x++;
    }
    printf("%llu",W);
    return 0;
}
