I'll just find the smallest m s.t. f(m) = 2015. Given that the algorithm is already specified, I don't really understand the "how many algorithms" part of the question.
For n < 10, f(n) = n
For 9 < n < 100, f(n) = ⌊n/10⌋ + n - 10⌊n/10⌋ = n - 9⌊n/10⌋
For 99 < n < 1000, f(n) = ⌊n/10⌋ - 9⌊⌊n/10⌋/10⌋ + n - 10⌊n/10⌋ = n - 9⌊n/10⌋ - 9⌊n/100⌋
For 999 < n < 10,000, f(n) = ⌊n/10⌋ - 9⌊⌊n/10⌋/10⌋ - 9⌊⌊n/10⌋/100⌋ + n - 10⌊n/10⌋ = n - 9⌊n/10⌋ - 9⌊n/100⌋ - 9⌊n/1000⌋
The pattern should be clear by now. If n has digits abcd with a > 0, then f(n) = abcd - 9(abc + ab + a) = a + b + c + d. At this stage, it should be easy to convince yourself that f is just the digit sum function.
The smallest number with digit sum 2015 is an 8 followed by 223 9s since 2015 = 223*9 + 8.
@Grim_Reaper @incelpardo99