A population of bacteria doubles every 4 hours. Initially, there are 500 bacteria. After 12 hours, the population of bacteria increases by an additional 30%. How many bacteria are there at the end of 12 hours? Let's think step by step and output the final answer within \boxed{}.
user