let c = Array(readLine()!).sorted(by: >) + ["0"] print(c.firstIndex(of: "0")! - 1)