a,b,c,d,e = map(int, input().split()) print(max(a-b,a+c*d-(b+c*e)))