CMIMC 2016 Computer Science Problem 8

Consider the sequence of sets defined by S_{0}=\{0,1\}, S_{1}=\{0,1,2\}, and for n \geq 2,

S_{n}=S_{n-1} \cup\left\{2^{n}+x \mid x \in S_{n-2}\right\}

For example, S_{2}=\{0,1,2\} \cup\left\{2^{2}+0,2^{2}+1\right\}=\{0,1,2,4,5\}. Find the 200th smallest element of S_{2016}.