In a small town, the population was 50,000 at the beginning of the year. The population increases by 5% each year. Additionally, each year, 500 people move to the town, and 200 people move out of the town. Calculate the population of the town at the end of 5 years. Let's think step by step and output the final answer within \boxed{}.
user