import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter ou = new PrintWriter(System.out); char[] s = sc.next().toCharArray(); int n = s.length - 1; for(char i : s) if(i == '0') n--; ou.println(n); ou.flush(); sc.close(); } }