I use two criteria-

one is to protect bears (not to habituate them to human food because if they become camp raiders they often get put down).

two is to protect my food! Nobody actually NEEDS all the food they bring. What I am willing to loose has lower priority. My priority (likely the same as a bear) is calories. As much as I love my coffee and spice kit, if they do not fit, the do not go in. I doubt a bear would also get much satisfaction from my instant coffee.

Although stuff like toothpaste may attract a bear, if the bear got it, there is not much reward for him and if I were to loose it, not a big deal.

I take very little medicine, but the few pills I do take I do not put in the bear can. They stay in my FAK. Also, any personal hygiene products will not be a problem if they are unscented. Try to find unscented versions of those products.

Choosing low volume food will also add room. I can pack 10 days in my Bearikade Weekender and still have 2,500 calories per day. For example, freeze dried meals are low weight but some are high volume. Rice and couscous pack really well; almonds pack better than walnuts, cream of wheat packs smaller than oatmeal for the same calories. Loosely packed stuff fills in the gaps better than rigid square shapes (thus gorp is better than trail bars).

I also have a Ursack, in addition to my bear can. If I need a considerable amount of more room, I will supplement with that. Although not exactly legal in many places, it is more bear proof than a simple stuff sack.