A man invested $500 in the stock market. During the first week,he gained $200.During the second week, the market was strong and the man doubled his money. During the third week , stocks fell, and the man lost $650. How much money did the man have at the end of three weeks ?