#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define llong long long int main() { llong a, b, c; cin >> a >> b >> c; llong unit = (a-1) + b; llong year = c / unit * a; if(c % unit <= a-1) { year += c % unit; } else { year += a; } cout << year << endl; }