A,B,C,D = map(int,input().split()) print((B-A+1)*(D-C+1)-(B-C+1))