Write a function solution that, given an integer N, returns the smallest number with the same number of digits. You can assume n is between 1 and 1^9( a billion).