a1 = int(input())
a2 = int(input())
n = int(input())
d = a2 - a1
print(a1 + (n - 1) * d)

0a9ca1fef1b34ce302181bcdfe8da20c228a711a
<mask token>

<mask token>
print(a1 + (n - 1) * d)

a1 = int(input())
a2 = int(input())
n = int(input())
d = a2 - a1
print(a1 + (n - 1) * d)
