# 백준 #28444 (HI-ARC=?) # H, I, A, R, C 입력하기 H, I, A, R, C = map(int,input().split()) # 결과 출력하기 print((H*I)-(A*R*C))