https://www.acmicpc.net/problem/16673
import java.util.*;
import java.lang.String.format
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var c=s.nextInt()
var k=s.nextInt()
var p=s.nextInt()
var sum=0
for(i in 1..c) sum+=k*i+p*i*i
print(sum)
}