a,b,c,d,e = input().split(" ") a = int(a) b = int(b) c = int(c) d = int(d) e = int(e) # 配る予定の数 candy_num = a * (b-c) i = candy_num-1 X = d if i==1: pass elif i >=2: if i % 2 ==0: if(e <=X): X = X-e else: pass else: pass print(candy_num*X)