Unless there's some clever structure to the optimal position, this is a problem best solved by computer search. Potentially it could make a good Project Euler problem, potentially not (depending on how much computation the best human-writable program requires to do it).
Also, this post gave the false impression that there was a known answer. That irritated me when I read the comments.
I think I can prove 53 is the maximum. And the solution does have a nice structure.
What do these things have in common? Nerves, emotions, morality, prices.