from pip._vendor.distlib.compat import raw_input N = str(raw_input()).split(sep=" ") A = int(N[0]) B = int(N[1]) C = int(N[2]) i = 0 while True: if A+B <= C: C -= A+B-1 i += A else: i += C print(i) break