import sys
from sys import stdin

A,B,C,D,E = map(int,stdin.readline().split())

ans = max( A-B , (A+C*D) - (B+C*E) )

print (ans)