For every positive integer $n$, the function $f$ is defined as follows:
- $f(2n+1) = 2f(2n)$
- $f(2n) = f(2n-1) + 1$
- $f(1) = 0$

Determine the remainder when $f(2005)$ is divided by $5$.

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