Given an integer n, return the number of positive integers in the range [1, n] that have at least one repeated digit.