s,e,n=map(int,input().split()) if s != e and n == '1': print(-1) else: print(s*(int(n)-1)+e)