import java.util.Scanner; public class No604 { 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 k,K,sum; for(k = 0;(A+B-1) * k < C;k++) { } K = A * k; for(sum = (A+B-1)*k;sum >= C;K--) { if(K % A == 0) { sum -= B; }else { sum -= 1; } } System.out.println(K + 1); } }