a, b, c = (int(i) for i in input().split()) sum = (a - 1) + b over = int(c / sum) ama = c % sum if ama > a: ans = over * a + ama - 1 else: ans = over * a + ama if sum >= c: if a - 1 >= c: print(c) else: print(a) else: print(ans)