10 yuan: buy 5 bottles.
5 bottle caps, 5 empty bottles: 3 bottles.
After drinking, it's left.
4 bottle caps, 4 empty bottles: 3 bottles.
After drinking, it's left.
3 bottle caps and 3 empty bottles: 1 bottle,
There are 4 bottle caps and 2 empty bottles left: change 2 bottles.
After drinking, there are two bottle caps and two empty bottles left. Change: 1 bottle.
*** 15 bottles.