points
Eh, it's a pretty trivial problem, comptometers have it figured out more than a hundred years ago.