Question 30A function $f$, defined on the set of positive integers, has $f(1)=2$ and $f(2)=3$. Also $f(f(f(n)))=n+2$ if $n$ is even and $f(f(f(n)))=n+4$ if $n$ is odd. What is $f(777)$?