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