Mock AIME 2 2010 Problems/Problem 2

$\setcounter{enumi}{1}$ Let $a_1, a_2, \ldots, a_{10}$ be nonnegative integers such that $a_1 + a_2 + \ldots + a_{10} = 2010$, and define $f$ so that $f((a_1, a_2, \ldots, a_{10})) = (b_1, b_2, \ldots, b_{10})$, with $0 \le b_i \le 2, 3|a_i-b_i$ for $1 \le i \le 10$. Given that $f$ can take on $K$ distinct values, find the remainder when $K$ is divided by 1000.