  We prove an explicit formula for the spectral expansions in $L^2(\R)$
generated by selfadjoint differential operators $$
(-1)^n\frac{d^{2n}}{dx^{2n}}+\sum\limits_{j=0}^{n-1}\frac{d^{j}}{dx^{j}}
p_j(x)\frac{d^{j}}{dx^{j}},\quad p_j(x+\pi)=p_j(x),\quad x\in\R. $$
