import java.util.Scanner;

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

        int count = 0;
        for(char c: s) {
            if(c == '1') {
                count++;
            }
        }
        System.out.println(count);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();

        int count = 0;
        for(char c: s) {
            if(c == '1') {
                count++;
            }
        }
        System.out.println(count);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();

        int count = 0;
        for(char c: s) {
            if(c == '1') {
                count++;
            }
        }
        System.out.println(count);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();

        int count = 0;
        for(char c: s) {
            if(c == '1') {
                count++;
            }
        }
        System.out.println(count);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.nextLine().toCharArray(); s sc.nextLine().toCharArray() sc.nextLine().toCharArray sc.nextLine() sc.nextLine sc int count = 0; count 0 for(char c: s) {
            if(c == '1') {
                count++;
            }
        } char c s {
            if(c == '1') {
                count++;
            }
        } {
            if(c == '1') {
                count++;
            }
        } if(c == '1') {
                count++;
            } c == '1' c '1' {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();

        int count = 0;
        for(char c: s) {
            if(c == '1') {
                count++;
            }
        }
        System.out.println(count);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.nextLine().toCharArray();

        int count = 0;
        for(char c: s) {
            if(c == '1') {
                count++;
            }
        }
        System.out.println(count);
        sc.close();
    }
} Main
import java.util.Scanner;

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

        int count = 0;
        for(char c: s) {
            if(c == '1') {
                count++;
            }
        }
        System.out.println(count);
        sc.close();
    }
}
