Let $n$ be an integer between $0$ and $5^5$. Arrange $n$ black stones and $5^5-n$ white stones in a row, and repeat the following operation $5$ times: group the stones in sets of $5$ from left to right, and replace the $5$ stones in each group with one stone of the color that appears more frequently among them. Find the minimum possible value of $n$ such that the last remaining stone is always black, regardless of the initial arrangement.

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