There is probably a more elegant way to see this, but:
Let $T_n$ be the desired answer. That is, the number of good strings of length $n$.
Let $A_n$ be the number which end in surf.
Let $B_n$ be the number which end in ski.
Let $C_n$ be the number which end in rest.
Then, of course, $$T_n=A_n+B_n+C_n$$
Recursively, it is clear that $$A_n=A_{n-1}+C_{n-1}\quad B_n=B_{n-1}+C_{n-1}\quad C_n=T_{n-1}$$ Adding we get $$T_n=A_{n-1}+B_{n-1}+C_{n-1}+C_{n-1}+T_{n-1}=2T_{n-1}+T_{n-2}$$
A quick calculation then gives $$\boxed {T_9=3363}$$