def main(): A, B, C, D, E = map(int, input().split()) if D <= E: print(A-B) return print(A-B + C*(D-E)) if __name__ == "__main__": main()