#include using namespace std; int main(void){ long long A,B,C; cin >> A >> B >> C; long long remain,block; block = (C / (A - 1 + B)) * A; remain = C - block; if(A > remain) { cout << block + remain; } else { cout << block + A; } }