class Solution {
public long solution(int price, int money, int count) {
long answer =0;
long mo=0;
for(int i=1; i<=count; i++){
mo+=price*i;
}
if(money>=mo){
return 0;
}else{
answer = mo-money;
}
return answer;
}
}