Let S be the sum of the base 10 logarithms of all the proper divisors of 1000000. What is the integer neareat to S?

(第四届AIME1986 第8题)