If you've ever seen the guys refilling the machine, you know it's got a slot for every drink button. There are about eight buttons on the average machine, and I'm guessing that each row holds about a case of soda -- 24 units (cans or bottles).
So, that's 192 refreshing beverages per machine.
Now, they don't just wait until everything is empty to refill, and not every customer is going to pay with two $1 bills. So, let's make a couple of assumptions:
1. They refill the machine when it's about half-empty, so you only need change for about half of what the machine holds.
2. If you put in $2, you get back $0.75 in change (if the soda is $1.25), but we don't need to do that every time.
3. Given the usage patterns that I've observed, I'm figuring that we only need to provide change for about every third bottle, so we need about a quarter for every drink unit that we sell.
Put those together, and you get $24 in change.