import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); long times = c / (a - 1 + b); long mod = c % (a - 1 + b); long ans; if (mod < a) { ans = times * a + mod; } else { ans = (times + 1) * a; } System.out.println(ans); } }