
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int sum = 0;
		String s = scan.next();
		if(s.substring(0, 1).equals("1")) {
			sum++;
		}
		if(s.substring(1, 2).equals("1")) {
			sum++;
		}
		if(s.substring(2, 3).equals("1")) {
			sum++;
		}
		System.out.println(sum);
		scan.close();

	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int sum = 0;
		String s = scan.next();
		if(s.substring(0, 1).equals("1")) {
			sum++;
		}
		if(s.substring(1, 2).equals("1")) {
			sum++;
		}
		if(s.substring(2, 3).equals("1")) {
			sum++;
		}
		System.out.println(sum);
		scan.close();

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int sum = 0;
		String s = scan.next();
		if(s.substring(0, 1).equals("1")) {
			sum++;
		}
		if(s.substring(1, 2).equals("1")) {
			sum++;
		}
		if(s.substring(2, 3).equals("1")) {
			sum++;
		}
		System.out.println(sum);
		scan.close();

	} main {
		Scanner scan = new Scanner(System.in);
		int sum = 0;
		String s = scan.next();
		if(s.substring(0, 1).equals("1")) {
			sum++;
		}
		if(s.substring(1, 2).equals("1")) {
			sum++;
		}
		if(s.substring(2, 3).equals("1")) {
			sum++;
		}
		System.out.println(sum);
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int sum = 0; sum 0 String s = scan.next(); s scan.next() scan.next scan if(s.substring(0, 1).equals("1")) {
			sum++;
		} s.substring(0, 1).equals("1") s.substring(0, 1).equals s.substring(0, 1) s.substring s 0 1 "1" {
			sum++;
		} sum++ sum if(s.substring(1, 2).equals("1")) {
			sum++;
		} s.substring(1, 2).equals("1") s.substring(1, 2).equals s.substring(1, 2) s.substring s 1 2 "1" {
			sum++;
		} sum++ sum if(s.substring(2, 3).equals("1")) {
			sum++;
		} s.substring(2, 3).equals("1") s.substring(2, 3).equals s.substring(2, 3) s.substring s 2 3 "1" {
			sum++;
		} sum++ sum System.out.println(sum) System.out.println System.out System System.out sum scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int sum = 0;
		String s = scan.next();
		if(s.substring(0, 1).equals("1")) {
			sum++;
		}
		if(s.substring(1, 2).equals("1")) {
			sum++;
		}
		if(s.substring(2, 3).equals("1")) {
			sum++;
		}
		System.out.println(sum);
		scan.close();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int sum = 0;
		String s = scan.next();
		if(s.substring(0, 1).equals("1")) {
			sum++;
		}
		if(s.substring(1, 2).equals("1")) {
			sum++;
		}
		if(s.substring(2, 3).equals("1")) {
			sum++;
		}
		System.out.println(sum);
		scan.close();

	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int sum = 0;
		String s = scan.next();
		if(s.substring(0, 1).equals("1")) {
			sum++;
		}
		if(s.substring(1, 2).equals("1")) {
			sum++;
		}
		if(s.substring(2, 3).equals("1")) {
			sum++;
		}
		System.out.println(sum);
		scan.close();

	}

}
