use std::{collections::HashSet, io}; fn main() { let n = read_line(); let ret = run(n); println!("{}", ret); } fn run(mut n: String) -> usize { let mut set = HashSet::new(); for i in 0..=n.len() { for x in '0'..='9' { n.insert(i, x); if !n.starts_with("0") { set.insert(n.clone()); } n.remove(i); } } set.len() } fn read_line() -> String { let mut line = String::new(); io::stdin().read_line(&mut line).unwrap(); line.trim().to_string() }