import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String s = stdR.readLine();
        int n = 0;
        for(int i = 0 ; i < s.length(); i++) {
            if(s.charAt(i) == '1')n++;
        }
        System.out.println(n);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String s = stdR.readLine();
        int n = 0;
        for(int i = 0 ; i < s.length(); i++) {
            if(s.charAt(i) == '1')n++;
        }
        System.out.println(n);
    }
} Main public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String s = stdR.readLine();
        int n = 0;
        for(int i = 0 ; i < s.length(); i++) {
            if(s.charAt(i) == '1')n++;
        }
        System.out.println(n);
    } main {
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String s = stdR.readLine();
        int n = 0;
        for(int i = 0 ; i < s.length(); i++) {
            if(s.charAt(i) == '1')n++;
        }
        System.out.println(n);
    } BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in)); stdR new BufferedReader(new InputStreamReader(System.in)) String s = stdR.readLine(); s stdR.readLine() stdR.readLine stdR int n = 0; n 0 for(int i = 0 ; i < s.length(); i++) {
            if(s.charAt(i) == '1')n++;
        } int i = 0 ; int i = 0 ; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if(s.charAt(i) == '1')n++;
        } {
            if(s.charAt(i) == '1')n++;
        } if(s.charAt(i) == '1')n++; s.charAt(i) == '1' s.charAt(i) s.charAt s i '1' n++ n System.out.println(n) System.out.println System.out System System.out n String args[] args public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String s = stdR.readLine();
        int n = 0;
        for(int i = 0 ; i < s.length(); i++) {
            if(s.charAt(i) == '1')n++;
        }
        System.out.println(n);
    }
} public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String s = stdR.readLine();
        int n = 0;
        for(int i = 0 ; i < s.length(); i++) {
            if(s.charAt(i) == '1')n++;
        }
        System.out.println(n);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        String s = stdR.readLine();
        int n = 0;
        for(int i = 0 ; i < s.length(); i++) {
            if(s.charAt(i) == '1')n++;
        }
        System.out.println(n);
    }
}