wuhu=[int(r) for r in input().split(' ')] n1=wuhu[0] n2=wuhu[1] num=wuhu[2] c=n2-n1 print(int(numn1+num(num-1)*c/2))