Place Now, Take Later

Two opaque boxes and exactly 100 turns. On each turn you must do one of:

  • Place: add 1 dollar to one of the two boxes, chosen uniformly at random
  • Take: choose one of the two boxes uniformly at random, empty it, and pocket whatever was inside

You see nothing until the game is over, so your whole schedule of actions is fixed in advance. A dollar you placed reaches your pocket only if some later Take happens to choose the box it landed in.

best = max(((n, n * (1 - 0.5 ** (100 - n))) for n in range(1, 100)),
           key=lambda pair: pair[1])
print(best)   # (Place turns, expected payout)

How many of the 100 turns should be Places? Answer format: enter an integer.