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