Solution:
Notice that the order in which the people leave the line is irrelevant. Give each right-facing person a weight of 1, and each left-facing person a weight of −1. We claim the answer for some arrangement of these 2n people is −2 times the minimum prefix sum. For instance:
LRRLRLLLRRRRL →(−2)(−2)→4 RRRLLRLLLRRL →(−2)(−1)→2
Proof. The final configuration is always of the form

and the minimum prefix sum is invariant. As the final configuration has minimum prefix sum k, we are done.
So, we want to find the expected value of the minimum prefix sum across all such strings of 1s and −1s. To find this, we will instead compute the equivalent value
k=1∑∞Pr[ maximum prefix sum is ≥k]
Consider the kth term of this sum, and the corresponding walk from (0,0) to (2n,0) with L corresponding to a step of (1,−1) and R corresponding to a step of (1,1). Consider the point P at y=k with minimal x-coordinate, and reflect the remainder of the walk across y=k. This gives a path that ends at (2n,2k). Noting that this is a bijection between walks from (0,0) to (2n,2k) and walks that reach y=k, we have
k=1∑∞Pr[ maximum prefix sum is ≥k]=k=1∑∞(n2n)(n−k2n)=21[(k=−∞∑∞(n2n)(n−k2n))−1]=21((n2n)22n−1)
Adjusting for the factor of 2 we saved at the beginning, our final answer for n=50 is (50100)2100−1.