PUMaC 2016 Number Theory B Problem 5

For odd positive integers n, define f(n) to be the smallest odd integer greater than n that is not relatively prime to n. Compute the smallest n such that f(f(n)) is not divisible by 3.