Path-integral approach to classical mechanics and Toda criterion