
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	String s;

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

	String s;

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

	String s;

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

	String s;

	public void run() {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		int ans = 0;
		if(s.charAt(0)=='1') ans++;
		if(s.charAt(1)=='1') ans++;
		if(s.charAt(2)=='1') ans++;
		System.out.println(ans);
		sc.close();
	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	String s;

	public void run() {
		Scanner sc = new Scanner(System.in);
		s = sc.next();
		int ans = 0;
		if(s.charAt(0)=='1') ans++;
		if(s.charAt(1)=='1') ans++;
		if(s.charAt(2)=='1') ans++;
		System.out.println(ans);
		sc.close();
	}
}
