Riddle: A man decides to buy a nice horse. He pays $600 for it, and he is very content with this strong animal. After a year, the value of the horse has increased to $700 and he decides to sell the horse. But already a few days later he regrets his decision to sell the beautiful horse, and he buys it again. Unfortunately he has to pay $800 to get it back, so he loses $100. After another year of owning the horse, he finally decides to sell the horse for $900. What is the overall profit the man makes?