# -*- coding: utf-8 -*- """ No.604 誕生日のお小遣い https://yukicoder.me/problems/no/604 """ import sys from sys import stdin from math import ceil input = stdin.readline def solve(A, B, C): if A == 1: return ceil(C / B) cycle_income = B + (A - 1) cycle = C // cycle_income ans1 = C - (cycle_income * cycle) + A * cycle ans2 = (cycle + 1) * A return min(ans1, ans2) def main(args): A, B, C = map(int, input().split()) ans = solve(A, B, C) print(ans) if __name__ == '__main__': main(sys.argv[1:])