Find the largest positive integer $N$ such that the number of integers in the set $\{1, 2, \dots, N\}$ divisible by 3 is equal to the number of integers divisible by 5 or 7 (or both).

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