import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int ans = 0;
		int N = scn.nextInt();
		if(N/100==1)ans++;
		if((N%100)/10==1)ans++;
		if(N%10==1)ans++;
		System.out.println(ans);
	}

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

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int ans = 0;
		int N = scn.nextInt();
		if(N/100==1)ans++;
		if((N%100)/10==1)ans++;
		if(N%10==1)ans++;
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int ans = 0;
		int N = scn.nextInt();
		if(N/100==1)ans++;
		if((N%100)/10==1)ans++;
		if(N%10==1)ans++;
		System.out.println(ans);
	} main {
		Scanner scn = new Scanner(System.in);
		int ans = 0;
		int N = scn.nextInt();
		if(N/100==1)ans++;
		if((N%100)/10==1)ans++;
		if(N%10==1)ans++;
		System.out.println(ans);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int ans = 0; ans 0 int N = scn.nextInt(); N scn.nextInt() scn.nextInt scn if(N/100==1)ans++; N/100==1 N/100 N 100 1 ans++ ans if((N%100)/10==1)ans++; (N%100)/10==1 (N%100)/10 (N%100) N 100 10 1 ans++ ans if(N%10==1)ans++; N%10==1 N%10 N 10 1 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int ans = 0;
		int N = scn.nextInt();
		if(N/100==1)ans++;
		if((N%100)/10==1)ans++;
		if(N%10==1)ans++;
		System.out.println(ans);
	}

} public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int ans = 0;
		int N = scn.nextInt();
		if(N/100==1)ans++;
		if((N%100)/10==1)ans++;
		if(N%10==1)ans++;
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int ans = 0;
		int N = scn.nextInt();
		if(N/100==1)ans++;
		if((N%100)/10==1)ans++;
		if(N%10==1)ans++;
		System.out.println(ans);
	}

}
