import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int i = Integer.parseInt(str, 2);
		System.out.println(Integer.bitCount(i));
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int i = Integer.parseInt(str, 2);
		System.out.println(Integer.bitCount(i));
		
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int i = Integer.parseInt(str, 2);
		System.out.println(Integer.bitCount(i));
		
	} main {

		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int i = Integer.parseInt(str, 2);
		System.out.println(Integer.bitCount(i));
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int i = Integer.parseInt(str, 2); i Integer.parseInt(str, 2) Integer.parseInt Integer str 2 System.out.println(Integer.bitCount(i)) System.out.println System.out System System.out Integer.bitCount(i) Integer.bitCount Integer i String[] args args public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int i = Integer.parseInt(str, 2);
		System.out.println(Integer.bitCount(i));
		
	}
} public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int i = Integer.parseInt(str, 2);
		System.out.println(Integer.bitCount(i));
		
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int i = Integer.parseInt(str, 2);
		System.out.println(Integer.bitCount(i));
		
	}
}
