#include using namespace std; int main(void){ auto start = clock(); long long A,B,C; scanf("%d%d%d",&A,&B,&C); long long block,remain; block = (A - 1) + B; remain = C % block; if(remain == 0) { return (C / block) * A; } else { return (C / block) * A + remain; } }