import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int s = sc.nextInt();
		
		int c = 0;
		while(s>0){
			if(s%10!=0)
				c++;
			s/=10;
		}
		
		System.out.println(c);
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int s = sc.nextInt();
		
		int c = 0;
		while(s>0){
			if(s%10!=0)
				c++;
			s/=10;
		}
		
		System.out.println(c);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int s = sc.nextInt();
		
		int c = 0;
		while(s>0){
			if(s%10!=0)
				c++;
			s/=10;
		}
		
		System.out.println(c);
	} main {
		Scanner sc = new Scanner(System.in);
		
		int s = sc.nextInt();
		
		int c = 0;
		while(s>0){
			if(s%10!=0)
				c++;
			s/=10;
		}
		
		System.out.println(c);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int c = 0; c 0 while(s>0){
			if(s%10!=0)
				c++;
			s/=10;
		} s>0 s 0 {
			if(s%10!=0)
				c++;
			s/=10;
		} if(s%10!=0)
				c++; s%10!=0 s%10 s 10 0 c++ c s/=10 s 10 System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int s = sc.nextInt();
		
		int c = 0;
		while(s>0){
			if(s%10!=0)
				c++;
			s/=10;
		}
		
		System.out.println(c);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int s = sc.nextInt();
		
		int c = 0;
		while(s>0){
			if(s%10!=0)
				c++;
			s/=10;
		}
		
		System.out.println(c);
	}

} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int s = sc.nextInt();
		
		int c = 0;
		while(s>0){
			if(s%10!=0)
				c++;
			s/=10;
		}
		
		System.out.println(c);
	}

}
