import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count =0;
		String str = sc.next();
		char[] c = str.toCharArray();
		if(c[0]=='1') count++;
		if(c[1]=='1')count++;
		if(c[2]=='1')count++;
		System.out.printf("%d\n",count);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count =0;
		String str = sc.next();
		char[] c = str.toCharArray();
		if(c[0]=='1') count++;
		if(c[1]=='1')count++;
		if(c[2]=='1')count++;
		System.out.printf("%d\n",count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count =0;
		String str = sc.next();
		char[] c = str.toCharArray();
		if(c[0]=='1') count++;
		if(c[1]=='1')count++;
		if(c[2]=='1')count++;
		System.out.printf("%d\n",count);
	} main {
		Scanner sc = new Scanner(System.in);
		int count =0;
		String str = sc.next();
		char[] c = str.toCharArray();
		if(c[0]=='1') count++;
		if(c[1]=='1')count++;
		if(c[2]=='1')count++;
		System.out.printf("%d\n",count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count =0; count 0 String str = sc.next(); str sc.next() sc.next sc char[] c = str.toCharArray(); c str.toCharArray() str.toCharArray str if(c[0]=='1') count++; c[0]=='1' c[0] c 0 '1' count++ count if(c[1]=='1')count++; c[1]=='1' c[1] c 1 '1' count++ count if(c[2]=='1')count++; c[2]=='1' c[2] c 2 '1' count++ count System.out.printf("%d\n",count) System.out.printf System.out System System.out "%d\n" count String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count =0;
		String str = sc.next();
		char[] c = str.toCharArray();
		if(c[0]=='1') count++;
		if(c[1]=='1')count++;
		if(c[2]=='1')count++;
		System.out.printf("%d\n",count);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count =0;
		String str = sc.next();
		char[] c = str.toCharArray();
		if(c[0]=='1') count++;
		if(c[1]=='1')count++;
		if(c[2]=='1')count++;
		System.out.printf("%d\n",count);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count =0;
		String str = sc.next();
		char[] c = str.toCharArray();
		if(c[0]=='1') count++;
		if(c[1]=='1')count++;
		if(c[2]=='1')count++;
		System.out.printf("%d\n",count);
	}
}
