import java.util.Scanner;
public class Main{
static int N = 105;
static int a[][] = new int[N][N];
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
while(n-->0) {
int x1 = scanner.nextInt();
int y1 = scanner.nextInt();
int x2 = scanner.nextInt();
int y2 = scanner.nextInt();
for(int i = x1; i < x2; i ++) {
for(int j = y1; j < y2; j++) {
a[i][j] = 1;
}
}
}
int res = 0;
for(int i = 0 ; i < 100; i ++) {
for(int j = 0 ; j < 100; j ++) {
if(a[i][j]==1) res++;
}
}
System.out.println(res);
}
}
网友评论