package no176; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextInt(); long b = sc.nextInt(); long t = sc.nextInt(); long 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); } }