There are five dots arranged in a line from left to right. Each of the dots is colored from one of five colors such that no three consecutive dots are all the same color. How many ways are there to color the dots?

Let's think step by step and output the final answer within \boxed{}.
user