Formation of a beam of high optical quality in a multistage neodymium laser