Last week I finished a two month diet where a big chunk of my weekly calories and nutrients came from cheap staples I prepared myself (specifically brown rice, black beans, steelcut oats, spinach, and eggs).
Aside from the food, the cost was 1. watching some ads in the free version of the calorie counter app I used to make sure I was getting the nutrients I needed and 2. ~$30 for a food scale so I could be precise about what I was eating.
Circumstances make it easier to be unhealthy but what I did is attainable by the vast majority of obese people.