import java.util.Scanner;

public class Main {

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

        String in = scanner.next();

        int result = 0;
        for (int i = 0; i < in.length(); i++) {
            if (in.charAt(i) == '1') {
                result++;
            }
        }

        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {

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

        String in = scanner.next();

        int result = 0;
        for (int i = 0; i < in.length(); i++) {
            if (in.charAt(i) == '1') {
                result++;
            }
        }

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

        String in = scanner.next();

        int result = 0;
        for (int i = 0; i < in.length(); i++) {
            if (in.charAt(i) == '1') {
                result++;
            }
        }

        System.out.println(result);
    } main {
        Scanner scanner = new Scanner(System.in);

        String in = scanner.next();

        int result = 0;
        for (int i = 0; i < in.length(); i++) {
            if (in.charAt(i) == '1') {
                result++;
            }
        }

        System.out.println(result);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String in = scanner.next(); in scanner.next() scanner.next scanner int result = 0; result 0 for (int i = 0; i < in.length(); i++) {
            if (in.charAt(i) == '1') {
                result++;
            }
        } int i = 0; int i = 0; i 0 i < in.length() i in.length() in.length in i++ i++ i {
            if (in.charAt(i) == '1') {
                result++;
            }
        } {
            if (in.charAt(i) == '1') {
                result++;
            }
        } if (in.charAt(i) == '1') {
                result++;
            } in.charAt(i) == '1' in.charAt(i) in.charAt in i '1' {
                result++;
            } result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

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

        String in = scanner.next();

        int result = 0;
        for (int i = 0; i < in.length(); i++) {
            if (in.charAt(i) == '1') {
                result++;
            }
        }

        System.out.println(result);
    }
} public class Main {

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

        String in = scanner.next();

        int result = 0;
        for (int i = 0; i < in.length(); i++) {
            if (in.charAt(i) == '1') {
                result++;
            }
        }

        System.out.println(result);
    }
} Main
import java.util.Scanner;

public class Main {

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

        String in = scanner.next();

        int result = 0;
        for (int i = 0; i < in.length(); i++) {
            if (in.charAt(i) == '1') {
                result++;
            }
        }

        System.out.println(result);
    }
}
