#include<stdio.h>
int main(){
    scanf("%d %d" , &N,&M);
    for (Ai=N;Ai>1000000000);
    scanf("%d",&Ai);
    scanf("%d %d" , &Xi,&Yi);
    for (Xi=M;Yi=M;);
    sreca= Ai*(Xi-Yi);
    printf("%d" , sreca);
    return 0;
}