Question 117
Let $n$ be a positive integer. Two squirrels, Bushy and Jumpy, have collected $n$ walnuts for the winter. One day, Jumpy noticed that Bushy had arranged the walnuts into $n$ piles, with a single walnut in each pile. "That's way too many piles!" Unhappy, Jumpy decides to perform the following actions: in each action, he chooses two piles, takes equal numbers of walnuts from the two piles, and combines them into a new pile. Jumpy's goal is to make $P$, the number of nonempty piles, as small as possible. For each positive integer $n$, find the smallest possible value of $P$ that Jumpy can achieve through finitely many actions.