A, B, C, D, E = map(int, input().split()) if D - E >= 0: print((D - E) * C + A - B) else: print((D - E) * 0 + A - B)