t = input().split()
n = int(t[0])
a = int(t[1])
d = int(t[2])
lt = a + (n - 1) * d
print((a + lt) * n // 2)

5044e8b9a8b8744329986d282bdf3dfad07df857
<mask token>

<mask token>
print((a + lt) * n // 2)

t = input().split()
n = int(t[0])
a = int(t[1])
d = int(t[2])
lt = a + (n - 1) * d
print((a + lt) * n // 2)
