Tatjana imagined a polynomial $P(x)$ with nonnegative integer coefficients. Danica is trying to guess the polynomial. In each step, she chooses an integer $k$ and Tatjana tells her the value of $P(k)$. Find the smallest number of steps Danica needs in order to find the polynomial Tatjana imagined.
To determine the polynomial \( P(x) \) with nonnegative integer coefficients, Danica can use the following steps:

1. **Step 1: Choose \( k = 2 \) and find \( P(2) \).**
   - Let \( P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0 \).
   - When \( k = 2 \), we have \( P(2) = a_n 2^n + a_{n-1} 2^{n-1} + \cdots + a_1 2 + a_0 \).
   - This gives us a number in base 10 that represents the polynomial evaluated at \( x = 2 \).

2. **Step 2: Choose \( k = P(2) + 1 \) and find \( P(P(2) + 1) \).**
   - Let \( k = P(2) + 1 \).
   - Evaluate the polynomial at this new \( k \): \( P(P(2) + 1) \).
   - The result \( P(P(2) + 1) \) will be a number in base \( P(2) + 1 \).

3. **Interpret the result in base \( P(2) + 1 \).**
   - The coefficients of the polynomial \( P(x) \) are nonnegative integers.
   - When we evaluate \( P(x) \) at \( k = P(2) + 1 \), the result can be interpreted as a number in base \( P(2) + 1 \).
   - Since \( P(2) + 1 \) is greater than any coefficient of the polynomial, the base representation will directly give us the coefficients of the polynomial.

To illustrate this with an example, consider the polynomial \( P(x) = 3x^2 + 2x + 1 \):

1. **Step 1: Choose \( k = 2 \) and find \( P(2) \):**
   \[
   P(2) = 3(2^2) + 2(2) + 1 = 3(4) + 2(2) + 1 = 12 + 4 + 1 = 17
   \]

2. **Step 2: Choose \( k = P(2) + 1 = 17 + 1 = 18 \) and find \( P(18) \):**
   \[
   P(18) = 3(18^2) + 2(18) + 1 = 3(324) + 2(18) + 1 = 972 + 36 + 1 = 1009
   \]

3. **Interpret the result in base \( 18 \):**
   - Convert \( 1009 \) to base \( 18 \):
     \[
     1009 = 3 \cdot 18^2 + 2 \cdot 18 + 1
     \]
   - This gives us the coefficients \( 3, 2, 1 \) for the polynomial \( P(x) = 3x^2 + 2x + 1 \).

Thus, Danica can determine the polynomial in just 2 steps.

The final answer is \( \boxed{2} \).