A,B,C,D,E=[int(i) for i in input().split()] if D>E: print((D-E)*C+A-B) else: print(A-B)