f(n)=f(n-3), f(0)=1, f(1)=-1, f(2)=0