Getting the most power out of my 400 stage 6 heads

Well the 509 is what I pulled out the engine so I know it clears. I know once I buy a cam and get the pushrods and everything for it I'll of course bolt heads on, use some putty and check clearence on top of the Pistons I just want a ball park idea of what is enough to make the most power possible without it being too much because it would suck to spend a couple hundred bucks on a cam&lifter set then it not clear pistons and be Stuck with a cam I can't use nor return because it's been installed...

OF COURSE IT CLEARS WITH THE 906 HEADS, BUT DOES IT CLEAR WITH THE STG VI HEADS. THAT IS WHY YOU TEST IT WITH THE STG VI HEADS AND 509 YOU HAVE SO YOU GET AN IDEA OF HOW MUCH ROOM YOU DO HAVE RIGHT NOW WITH WHAT YOU'VE GOT. Yes I am yelling. I have been on the road for four days and I'm tired and short tempered. You've got the STG VI heads and the 509. Set them up and test the piston to valve clearance you have right now. Then we can give you an educated guess and not a dumb luck guess.