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