3. In the geometric sequence $\left\{a_{n}\right\}$, all terms are positive, and $a_{5}-a_{4}=576, a_{2}-a_{1}=9$, the sum of the first 5 terms $S_{5}=$ $\qquad$
3. 1023 .

From $a_{5}-a_{4}=a_{4}(q-1)=576, a_{2}-a_{1}=a_{1}(q-1)=9$, we get $a_{4}=64 a_{1}$, so $q^{3}=64, q=4$, $a_{1}=3$. $S_{5}=\frac{4^{5}-1}{4-1} \cdot 3=2^{10}-1=1023$.