f=open("vaipsis.txt") k, l, p=[int(s) for s in f.readline().strip().split(" ")] #m=[0]*l m=[[0]*l for nr in range(p)] def tryki(): for rida in m: print(" ".join([str(koht) for koht in rida])) for nr in range(k): n, s, e, w=[int(s) for s in f.readline().strip().split(" ")] for veerg in range(w, l-e): for rida in range(n, p-s): m[rida][veerg]=1 tryki() #Loe kokku ühtede arv muutujas m print(sum([rida.count(1) for rida in m]))