a, b, c = map(int, input().split()) res = a + b - 1 q, r = divmod(c, res) print(q * a + r)