World cup points (page 11 of the document). Best three out of four results count.
Basically in order the 112 quotas are given like this:
* 4 quotas for the eight NOCs with a m/w relay.
* a 5th quota for an NOC with a relay and at least eight entries in individual events.
* a number of quotas equal to the highest number of entries in individual events (i.e. if you qualify one entry in the 500m, 1000m and 1500m you get one quota, but if you qualify two entries in the 500m you get two quotas).
* any remaining quota gets redistributed first to the mixed relay, then to give countries with a m/w relay a fifth athlete.
For individual entries, quotas for NOCs that don’t have a relay are given one by one, first in the 500m, then the 1000m and then in the 1500m. I.e. the NOC of the first placed athlete in the 500m gets a quota, then the first place in the 1000m, then the first place in the 1500m, then the second place in the 500m and so on.