If x is a real number, let ⌊x⌋ be the greatest integer that is less than or equal to x. If n is a positive integer, let S(n) be defined by
S(n)=⌊10⌊logn⌋n⌋+10(n−10⌊logn⌋⋅⌊10⌊logn⌋n⌋).
(All the logarithms are base 10.) How many integers n from 1 to 2011 (inclusive) satisfy S(S(n))=n?