def main(): A, B, C = [int(_) for _ in input().split()] fullfill_year = [] l = 0 r = 10**20 while l <= r: # mは年数 m = (r+l) // 2 print(l, m, r) # 0~mに含まれるAの倍数の個数 num_of_mul_A = m // A # 0~mに含まれるAの倍数以外の個数 num_of_not_mul_A = m - num_of_mul_A total_money = num_of_mul_A * B + num_of_not_mul_A print(total_money) if total_money == C: fullfill_year.append(m) break elif total_money > C: fullfill_year.append(m) r = m-1 else: l = m+1 print(min(fullfill_year)) main()