import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next();
        String mask = "111";
        int count = 0;
        for (int i=0; i<input.length(); i++) {
            char c = input.charAt(i);
            if (c=='1') count++;
        }
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next();
        String mask = "111";
        int count = 0;
        for (int i=0; i<input.length(); i++) {
            char c = input.charAt(i);
            if (c=='1') count++;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next();
        String mask = "111";
        int count = 0;
        for (int i=0; i<input.length(); i++) {
            char c = input.charAt(i);
            if (c=='1') count++;
        }
        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next();
        String mask = "111";
        int count = 0;
        for (int i=0; i<input.length(); i++) {
            char c = input.charAt(i);
            if (c=='1') count++;
        }
        System.out.println(count);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.next(); input scanner.next() scanner.next scanner String mask = "111"; mask "111" int count = 0; count 0 for (int i=0; i<input.length(); i++) {
            char c = input.charAt(i);
            if (c=='1') count++;
        } int i=0; int i=0; i 0 i<input.length() i input.length() input.length input i++ i++ i {
            char c = input.charAt(i);
            if (c=='1') count++;
        } {
            char c = input.charAt(i);
            if (c=='1') count++;
        } char c = input.charAt(i); c input.charAt(i) input.charAt input i if (c=='1') count++; c=='1' c '1' 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 scanner = new Scanner(System.in);
        String input = scanner.next();
        String mask = "111";
        int count = 0;
        for (int i=0; i<input.length(); i++) {
            char c = input.charAt(i);
            if (c=='1') count++;
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next();
        String mask = "111";
        int count = 0;
        for (int i=0; i<input.length(); i++) {
            char c = input.charAt(i);
            if (c=='1') count++;
        }
        System.out.println(count);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.next();
        String mask = "111";
        int count = 0;
        for (int i=0; i<input.length(); i++) {
            char c = input.charAt(i);
            if (c=='1') count++;
        }
        System.out.println(count);
    }
}
