A, B, C = map(int, input().split()) D = A - 1 + B x = C // D res = x * A + (C - x * D) x += 1 res = min(res, x * A + max(0, (C - x * D))) print(res)