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