package no176; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int t = sc.nextInt(); int max = Math.min(a-1, (t+b-1)/b); long ans = Long.MAX_VALUE; for(int y=0;y= t) { x = 0; }else{ x = (t - (long)b * y + a - 1) / a; } ans = Math.min(a * x + b * y, ans); } System.out.println(ans); } }