a,b,c = gets.chomp.split.map(&:to_i) low = 0 high = 10**18 while low+1 < high x = (low+high)/2 ans = (x / a) * (b+a-1) + x % a if ans >= c high = x else low = x end end puts high