We are given the following function f, which takes a list of integers and outputs another list of integers. (Note that here the list is zero-indexed.)
1: \textbf{FUNCTION} f(A)
2: \quad \textbf{FOR} i=1, \ldots, \text{length} (A)-1 :
3: \quad \quad A[i] \leftarrow A[A[i]]
4: \quad \quad A[0] \leftarrow A[0]-1
5: \textbf{RETURN} A
Suppose the list B is equal to [0,1,2,8,2,0,1,7,0]. In how many entries do B and f(B) differ?