Integrals of motion for the Lorenz system