$\mathbb S_n$ as semidirect product
Solution 1:
More generally:
Theorem. If $G$ has a subgroup of index two, $H$ say, and there exists an element $g\not\in H$ of order two then $G$ splits as a semidirect product $G=H\rtimes\mathbb{Z}_2$.
This is because $\langle g\rangle\cap H=1$, and the other (internal) semidirect product conditions follow because $H$ has index two (so is normal, and so on).
So, in order to answer your question you simply need to find an element of order two in $S_n$ which is not contained in $A_n$.
Solution 2:
Hint: Given $\mathrm{sign}$ the parity of a permutation, you have an exact sequence
$$1 \to A_n \to S_n \overset{\mathrm{sign}}{\longrightarrow} \mathbb{Z}_2 \to 0.$$
Solution 3:
What are the permutations in $S_n$ that are not in $A_n$? How do they operate on $A_n$. Take $S_3$ as an example.