import java.util.Scanner;
public class shuziyouxi {
public static void main(String[] args) {
Scanner input =new Scanner(System.in);
long n=input.nextInt();
long k=input.nextInt();
long T=input.nextInt();
int count=1;
long a[]=new long[(int) (n*T)];
int sum=0;
for(int i=0;i<n*T;i++){
count+=i;
if(count>(k-1)){
a[i]=count%k;
}
else{
a[i]=count;
}
if(i%n==0){
sum+=a[i];
}
}
System.out.println(sum);
}
}