Given N number of rocks, determine how many elements are present in all rocks