All of it. Well, not the writing, per se, but I won't start a story until I know how it's going to end, as well as all of the major themes/kinks I'm exploring. For game mode stories, this usually means a summary of every single chapter. Of course, this doesn't mean I churn out a perfect plan in one night. Sometimes I just need to let things fester in my mind before I commit to them. I let the ideas naturally come to me over time, and then when I have enough, I compose a plan. Then I'll write enough to prove to myself that the premise works - this is in the realm of twelve to thirty initial chapters, depending on the average length of each one. Finally, I'll publish enough to let the audience know what kind of story it's going to be, and then update it as I write and edit.
But this probably isn't what you need. Just remember, every story eventually meets one of two fates: abandoned and incomplete, or finished to the author's satisfaction. You have the power to influence the outcome from the very beginning.