import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] s = scanner.nextLine().split("");
        int x = 0;
        for (int i = 0; i < s.length; i++) {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        }
        System.out.println(x);
        scanner.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] s = scanner.nextLine().split("");
        int x = 0;
        for (int i = 0; i < s.length; i++) {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        }
        System.out.println(x);
        scanner.close();
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] s = scanner.nextLine().split("");
        int x = 0;
        for (int i = 0; i < s.length; i++) {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        }
        System.out.println(x);
        scanner.close();
    } main {
        Scanner scanner = new Scanner(System.in);
        String[] s = scanner.nextLine().split("");
        int x = 0;
        for (int i = 0; i < s.length; i++) {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        }
        System.out.println(x);
        scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] s = scanner.nextLine().split(""); s scanner.nextLine().split("") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner "" int x = 0; x 0 for (int i = 0; i < s.length; i++) {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        } {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        } int a = Integer.parseInt(s[i]); a Integer.parseInt(s[i]) Integer.parseInt Integer s[i] s i if (a == 1) {
                x++;
            } a == 1 a 1 {
                x++;
            } x++ x System.out.println(x) System.out.println System.out System System.out x scanner.close() scanner.close scanner String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] s = scanner.nextLine().split("");
        int x = 0;
        for (int i = 0; i < s.length; i++) {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        }
        System.out.println(x);
        scanner.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] s = scanner.nextLine().split("");
        int x = 0;
        for (int i = 0; i < s.length; i++) {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        }
        System.out.println(x);
        scanner.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] s = scanner.nextLine().split("");
        int x = 0;
        for (int i = 0; i < s.length; i++) {
            int a = Integer.parseInt(s[i]);
            if (a == 1) {
                x++;
            }
        }
        System.out.println(x);
        scanner.close();
    }
}
