a = io.read() n = #a t = {} for i = 0, n do for j = 0, 9 do local v = a:sub(1, i) .. tostring(j) .. a:sub(i + 1, n) while v:sub(1, 1) == "0" do v = v:sub(2, #v) end t[v] = true end end c = 0 for key, val in pairs(t) do c = c + 1 end print(c - 1)