Let h 1,…, h n be positive integers. We study new sums m(h 1,…,h n)= ∑ r 1=0 h 1−1 ⋯ ∑ r n=0 h n−1 min r 1 h 1 ,…, r n h n and M(h 1,…,h n)= ∑ r 1=0 h 1−1 ⋯ ∑ r n=0 h n−1 max r 1 h 1 ,…, r n h n , the first of which times h 1⋯ h n is the number of lattice points in a pyramid of dimension n+1. We show that m(h 1,…,h n) (h 1−1)⋯(h n−1) =1+ ∑ ∅≠I⊆{1,…,n} (−1) |I| m({h i} i∈I) ∏ i∈I (h i−1) if h 1,…, h n >1, and that M(h 1,…,h n)−h 1⋯h n+1 (h 1+1)⋯(h n+1) = ∑ ∅≠I⊆{1,…,n} (−1) |I| M({h i} i∈I) ∏ i∈I (h i+1) . The sums m( h 1, h 2) and M( h 1, h 2) are connected with the reciprocity law for Dedekind sums. The values of m( h 1, h 2, h 3), M( h 1, h 2, h 3) and m( h 1, h 2, h 3, h 4)+ M( h 1, h 2, h 3, h 4) are determined explicitly in the paper.