import java.util.*;

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

    Scanner scanner = new Scanner(System.in);

    String x = scanner.nextLine();
    String[] str = x.split("");
    int a = 0;
    for(String s : str){
    	if(s.equals("1")){a ++ ;}
    }
    System.out.println(a);
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){

    Scanner scanner = new Scanner(System.in);

    String x = scanner.nextLine();
    String[] str = x.split("");
    int a = 0;
    for(String s : str){
    	if(s.equals("1")){a ++ ;}
    }
    System.out.println(a);
    }
} Main public static void main(String[] args){

    Scanner scanner = new Scanner(System.in);

    String x = scanner.nextLine();
    String[] str = x.split("");
    int a = 0;
    for(String s : str){
    	if(s.equals("1")){a ++ ;}
    }
    System.out.println(a);
    } main {

    Scanner scanner = new Scanner(System.in);

    String x = scanner.nextLine();
    String[] str = x.split("");
    int a = 0;
    for(String s : str){
    	if(s.equals("1")){a ++ ;}
    }
    System.out.println(a);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String x = scanner.nextLine(); x scanner.nextLine() scanner.nextLine scanner String[] str = x.split(""); str x.split("") x.split x "" int a = 0; a 0 for(String s : str){
    	if(s.equals("1")){a ++ ;}
    } String s str {
    	if(s.equals("1")){a ++ ;}
    } {
    	if(s.equals("1")){a ++ ;}
    } if(s.equals("1")){a ++ ;} s.equals("1") s.equals s "1" {a ++ ;} a ++ a System.out.println(a) System.out.println System.out System System.out a String[] args args public class Main{
	public static void main(String[] args){

    Scanner scanner = new Scanner(System.in);

    String x = scanner.nextLine();
    String[] str = x.split("");
    int a = 0;
    for(String s : str){
    	if(s.equals("1")){a ++ ;}
    }
    System.out.println(a);
    }
} public class Main{
	public static void main(String[] args){

    Scanner scanner = new Scanner(System.in);

    String x = scanner.nextLine();
    String[] str = x.split("");
    int a = 0;
    for(String s : str){
    	if(s.equals("1")){a ++ ;}
    }
    System.out.println(a);
    }
} Main
import java.util.*;

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

    Scanner scanner = new Scanner(System.in);

    String x = scanner.nextLine();
    String[] str = x.split("");
    int a = 0;
    for(String s : str){
    	if(s.equals("1")){a ++ ;}
    }
    System.out.println(a);
    }
}