Solution to the MAxCounters problem