A, B, C = gets.split.map(&:to_i) ok = 10 ** 18 ng = 0 def f(x) b = x / A a = x - b B * b + a >= C end while (ok - ng).abs >= 2 x = (ok + ng) / 2 if f(x) ok = x else ng = x end end puts ok