Find the number of positive integers less than or equal to $2017$ whose base-three representation contains no digit equal to $0$.

Let's think step by step and output the final answer within \boxed{}.
user