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