Patient investors can build a multimillion-dollar portfolio by consistently buying an S&P 500 index fund.