import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String a = s.nextLine();
        int count = 0;

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

        for (int i = 0; i < a.length(); i++) {
            if (a.charAt(i) == '1') {
                count++;
            }
        }
        System.out.println(count);
        s.close();
    }
} Main public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String a = s.nextLine();
        int count = 0;

        for (int i = 0; i < a.length(); i++) {
            if (a.charAt(i) == '1') {
                count++;
            }
        }
        System.out.println(count);
        s.close();
    } main {
        Scanner s = new Scanner(System.in);
        String a = s.nextLine();
        int count = 0;

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

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

        for (int i = 0; i < a.length(); i++) {
            if (a.charAt(i) == '1') {
                count++;
            }
        }
        System.out.println(count);
        s.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String a = s.nextLine();
        int count = 0;

        for (int i = 0; i < a.length(); i++) {
            if (a.charAt(i) == '1') {
                count++;
            }
        }
        System.out.println(count);
        s.close();
    }
}