// No.799 赤黒かーどげぇむ package main import "fmt" func main() { var a, b, c, d int fmt.Scan(&a, &b, &c, &d) red := (b - a) + 1 black := (d - c) + 1 fmt.Println((red * black) - max((b-c)+1, 0)) }