say (get+get+!get)*sum lines.Bag.values X-1