import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String numStr = sc.next();
        char[] numChar = new char[numStr.length()];

        for(int i = 0; i<numStr.length(); i++){
            numChar[i] = numStr.charAt(i);
        }

        int count = 0;
        for(int j = 0; j<numStr.length(); j++){
            if(numChar[j] == '1'){
                count++;
            }
        }

        System.out.println(count);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String numStr = sc.next();
        char[] numChar = new char[numStr.length()];

        for(int i = 0; i<numStr.length(); i++){
            numChar[i] = numStr.charAt(i);
        }

        int count = 0;
        for(int j = 0; j<numStr.length(); j++){
            if(numChar[j] == '1'){
                count++;
            }
        }

        System.out.println(count);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String numStr = sc.next();
        char[] numChar = new char[numStr.length()];

        for(int i = 0; i<numStr.length(); i++){
            numChar[i] = numStr.charAt(i);
        }

        int count = 0;
        for(int j = 0; j<numStr.length(); j++){
            if(numChar[j] == '1'){
                count++;
            }
        }

        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);

        String numStr = sc.next();
        char[] numChar = new char[numStr.length()];

        for(int i = 0; i<numStr.length(); i++){
            numChar[i] = numStr.charAt(i);
        }

        int count = 0;
        for(int j = 0; j<numStr.length(); j++){
            if(numChar[j] == '1'){
                count++;
            }
        }

        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String numStr = sc.next(); numStr sc.next() sc.next sc char[] numChar = new char[numStr.length()]; numChar new char[numStr.length()] numStr.length() numStr.length numStr for(int i = 0; i<numStr.length(); i++){
            numChar[i] = numStr.charAt(i);
        } int i = 0; int i = 0; i 0 i<numStr.length() i numStr.length() numStr.length numStr i++ i++ i {
            numChar[i] = numStr.charAt(i);
        } {
            numChar[i] = numStr.charAt(i);
        } numChar[i] = numStr.charAt(i) numChar[i] numChar i numStr.charAt(i) numStr.charAt numStr i int count = 0; count 0 for(int j = 0; j<numStr.length(); j++){
            if(numChar[j] == '1'){
                count++;
            }
        } int j = 0; int j = 0; j 0 j<numStr.length() j numStr.length() numStr.length numStr j++ j++ j {
            if(numChar[j] == '1'){
                count++;
            }
        } {
            if(numChar[j] == '1'){
                count++;
            }
        } if(numChar[j] == '1'){
                count++;
            } numChar[j] == '1' numChar[j] numChar j '1' {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String numStr = sc.next();
        char[] numChar = new char[numStr.length()];

        for(int i = 0; i<numStr.length(); i++){
            numChar[i] = numStr.charAt(i);
        }

        int count = 0;
        for(int j = 0; j<numStr.length(); j++){
            if(numChar[j] == '1'){
                count++;
            }
        }

        System.out.println(count);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String numStr = sc.next();
        char[] numChar = new char[numStr.length()];

        for(int i = 0; i<numStr.length(); i++){
            numChar[i] = numStr.charAt(i);
        }

        int count = 0;
        for(int j = 0; j<numStr.length(); j++){
            if(numChar[j] == '1'){
                count++;
            }
        }

        System.out.println(count);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String numStr = sc.next();
        char[] numChar = new char[numStr.length()];

        for(int i = 0; i<numStr.length(); i++){
            numChar[i] = numStr.charAt(i);
        }

        int count = 0;
        for(int j = 0; j<numStr.length(); j++){
            if(numChar[j] == '1'){
                count++;
            }
        }

        System.out.println(count);
    }
}