In another question, someone discussed about the fact that, if $p_1,\ldots,p_n$ is a list of integer, then the polynomial $$f=\prod_{e_1,\ldots,e_n\in\{\pm1\}}(x+e_1\sqrt{p_1}+\cdots+e_n\sqrt{p_n})$$ has integer coefficient. Can someone explain better this to me?
edit: the link of the previous question is Minimal Polynomial of $\sqrt{2}+\sqrt{3}+\sqrt{5}$, and you have to multiple factor for every possible choice of $e_1,\ldots,e_n\in\{\pm1\}$