Pat invested money in the stock market. In his first year, his stock increases by 20%. He paid his stockbroker $300 and then lost $450. He withdrew $500 and then his remaining investment doubled. Pats investment is now worth $7100. How much was Pat's original investment.