The answer is n.
We consider each summand si=∣Ai∣⋅∣Ai+1∣∣Ai∩Ai+1∣.
If Ai∩Ai+1 is the empty set, then si=0.
If Ai∩Ai+1 is nonempty, because Ai=Ai+1, at least one of Ai and Ai+1 has more than one element, that is, max{∣Ai∣,∣Ai+1∣}≥2. Because Ai∩Ai+1 is a subset of each of Ai and Ai+1, ∣Ai∩Ai+1∣≤min{∣Ai∣,∣Ai+1∣} and
si=∣Ai∣⋅∣Ai+1∣∣Ai∩Ai+1∣≤max{∣Ai∣,∣Ai+1∣}⋅min{∣Ai∣,∣Ai+1∣}min{∣Ai∣,∣Ai+1∣}≤21.
It follows that
i=1∑2n∣Ai∣⋅∣Ai+1∣∣Ai∩Ai+1∣≤i=1∑2n21=n.
This upper bound can be achieved with sets
A1={1},A2={1,2},A3={2},A4={2,3},…,A2n−2={n−1,n},A2n−1={n},A2n={n,1}.