I came across the following fact:

> 
> Let $m$ and $n$ be natural numbers such that $n\geqslant m$ and $m\equiv n \pmod 2$. Then, there exists an irreducible polynomial $f\in\mathbb{Q}\left[X\right]$ of degree $n$ such that $f$ has exactly $m$ real roots.
> 
> 
> 

I guess it is well known for algebraists. Unfortunately, I cannot find the proof of this anywhere and I do not know how to prove it. Could you help me?