Minimal length of nonsimple closed geodesics on hyperbolic surfaces