As a former drunken sailor, I quit when I ran out of money.
Drunken sailor runs out of money