#include<stdio.h> int main() { int A,N,s; scanf("%d%d",&A,&N); while(N<=0) { scanf("%d",&N); } s=(A+A+N-1)*N/2; printf("%d",s); }