import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Integer oneCount = 0;
		if(s.charAt(0) == '1') {
			oneCount ++;
		}
		if(s.charAt(1) == '1') {
			oneCount ++;
		}
		if(s.charAt(2) == '1') {
			oneCount ++;
		}
		System.out.println(oneCount);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Integer oneCount = 0;
		if(s.charAt(0) == '1') {
			oneCount ++;
		}
		if(s.charAt(1) == '1') {
			oneCount ++;
		}
		if(s.charAt(2) == '1') {
			oneCount ++;
		}
		System.out.println(oneCount);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Integer oneCount = 0;
		if(s.charAt(0) == '1') {
			oneCount ++;
		}
		if(s.charAt(1) == '1') {
			oneCount ++;
		}
		if(s.charAt(2) == '1') {
			oneCount ++;
		}
		System.out.println(oneCount);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Integer oneCount = 0;
		if(s.charAt(0) == '1') {
			oneCount ++;
		}
		if(s.charAt(1) == '1') {
			oneCount ++;
		}
		if(s.charAt(2) == '1') {
			oneCount ++;
		}
		System.out.println(oneCount);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc Integer oneCount = 0; oneCount 0 if(s.charAt(0) == '1') {
			oneCount ++;
		} s.charAt(0) == '1' s.charAt(0) s.charAt s 0 '1' {
			oneCount ++;
		} oneCount ++ oneCount if(s.charAt(1) == '1') {
			oneCount ++;
		} s.charAt(1) == '1' s.charAt(1) s.charAt s 1 '1' {
			oneCount ++;
		} oneCount ++ oneCount if(s.charAt(2) == '1') {
			oneCount ++;
		} s.charAt(2) == '1' s.charAt(2) s.charAt s 2 '1' {
			oneCount ++;
		} oneCount ++ oneCount System.out.println(oneCount) System.out.println System.out System System.out oneCount String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Integer oneCount = 0;
		if(s.charAt(0) == '1') {
			oneCount ++;
		}
		if(s.charAt(1) == '1') {
			oneCount ++;
		}
		if(s.charAt(2) == '1') {
			oneCount ++;
		}
		System.out.println(oneCount);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Integer oneCount = 0;
		if(s.charAt(0) == '1') {
			oneCount ++;
		}
		if(s.charAt(1) == '1') {
			oneCount ++;
		}
		if(s.charAt(2) == '1') {
			oneCount ++;
		}
		System.out.println(oneCount);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		Integer oneCount = 0;
		if(s.charAt(0) == '1') {
			oneCount ++;
		}
		if(s.charAt(1) == '1') {
			oneCount ++;
		}
		if(s.charAt(2) == '1') {
			oneCount ++;
		}
		System.out.println(oneCount);
	}
}