#include <bits/stdc++.h>
using namespace std;
int main(){
int x,y,t;
cin>>x>>y>>t;
long long s,tim,f=1;
s=t*x;
if(s+x<f*y){
cout<<s<<endl;
return 0;
}
for(int i=1;;i++){
if(s+f*x==f*y){
cout<<f*y<<endl;
return 0;
}else if(s+f*x>f*y){
f++;
}else{
cout<<s+(f-1)*x<<endl;
return 0;
}
}
return 0;
}