Let m be the smallest positive integer whose cube root is of the form n+r. where n is a positive integer and r is a positive real number less than 1/1000. Find n.

(第五届AIME1987 第12题)