def main(): a, b, c = map(int, input().split()) cycle_ = c // (a - 1 + b) rest = c - cycle_ * (a - 1 + b) if rest <= (a - 1): print(cycle_ * a + rest) else: print((cycle_ + 1) * a) if __name__ == "__main__": main()