import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        int cnt = 0;
        for(int i=0; i<s.length(); i++){
            if(s.substring(i,i+1).equals("1")) cnt++;
        }
        
        scan.close();
        System.out.println(cnt);
    }
} import java.util.Scanner; Scanner java.util public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        int cnt = 0;
        for(int i=0; i<s.length(); i++){
            if(s.substring(i,i+1).equals("1")) cnt++;
        }
        
        scan.close();
        System.out.println(cnt);
    }
} Main public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        int cnt = 0;
        for(int i=0; i<s.length(); i++){
            if(s.substring(i,i+1).equals("1")) cnt++;
        }
        
        scan.close();
        System.out.println(cnt);
    } main {
        
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        int cnt = 0;
        for(int i=0; i<s.length(); i++){
            if(s.substring(i,i+1).equals("1")) cnt++;
        }
        
        scan.close();
        System.out.println(cnt);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.nextLine(); s scan.nextLine() scan.nextLine scan int cnt = 0; cnt 0 for(int i=0; i<s.length(); i++){
            if(s.substring(i,i+1).equals("1")) cnt++;
        } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            if(s.substring(i,i+1).equals("1")) cnt++;
        } {
            if(s.substring(i,i+1).equals("1")) cnt++;
        } if(s.substring(i,i+1).equals("1")) cnt++; s.substring(i,i+1).equals("1") s.substring(i,i+1).equals s.substring(i,i+1) s.substring s i i+1 i 1 "1" cnt++ cnt scan.close() scan.close scan System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        int cnt = 0;
        for(int i=0; i<s.length(); i++){
            if(s.substring(i,i+1).equals("1")) cnt++;
        }
        
        scan.close();
        System.out.println(cnt);
    }
} public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        int cnt = 0;
        for(int i=0; i<s.length(); i++){
            if(s.substring(i,i+1).equals("1")) cnt++;
        }
        
        scan.close();
        System.out.println(cnt);
    }
} Main
import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        
        Scanner scan = new Scanner(System.in);
        String s = scan.nextLine();
        int cnt = 0;
        for(int i=0; i<s.length(); i++){
            if(s.substring(i,i+1).equals("1")) cnt++;
        }
        
        scan.close();
        System.out.println(cnt);
    }
}