A program to calculate filling a box with chips and a rooms with boxes