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