#include <iostream> #include <stdio.h> #include <algorithm> #include <vector> #include <cmath> #include <string> #include<sstream> #include <queue> #include <limits> #include <cstdlib> #include <deque> #include <map> #include <set> using namespace std; int main() { long long A=0; long long B =0; long long C=0; cin>>A>>B>>C; long long syo =0; long long amari =0; syo = C/(A-1+B); amari = C%(A-1+B); if(amari>A){ cout<<A*syo+A<<endl; }else { cout<<A*syo+amari<<endl; } return 0; }