import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] a = sc.next().split("", 0);
        int result = 0;
        for (int i = 0; i < a.length; i++) {
            result += (Integer.parseInt(a[i]) == 1) ? 1 : 0;
        }

        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] a = sc.next().split("", 0);
        int result = 0;
        for (int i = 0; i < a.length; i++) {
            result += (Integer.parseInt(a[i]) == 1) ? 1 : 0;
        }

        System.out.println(result);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] a = sc.next().split("", 0);
        int result = 0;
        for (int i = 0; i < a.length; i++) {
            result += (Integer.parseInt(a[i]) == 1) ? 1 : 0;
        }

        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        String[] a = sc.next().split("", 0);
        int result = 0;
        for (int i = 0; i < a.length; i++) {
            result += (Integer.parseInt(a[i]) == 1) ? 1 : 0;
        }

        System.out.println(result);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] a = sc.next().split("", 0); a sc.next().split("", 0) sc.next().split sc.next() sc.next sc "" 0 int result = 0; result 0 for (int i = 0; i < a.length; i++) {
            result += (Integer.parseInt(a[i]) == 1) ? 1 : 0;
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            result += (Integer.parseInt(a[i]) == 1) ? 1 : 0;
        } {
            result += (Integer.parseInt(a[i]) == 1) ? 1 : 0;
        } result += (Integer.parseInt(a[i]) == 1) ? 1 : 0 result (Integer.parseInt(a[i]) == 1) ? 1 : 0 (Integer.parseInt(a[i]) == 1) Integer.parseInt(a[i]) Integer.parseInt Integer a[i] a i 1 1 0 System.out.println(result) System.out.println System.out System System.out result String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] a = sc.next().split("", 0);
        int result = 0;
        for (int i = 0; i < a.length; i++) {
            result += (Integer.parseInt(a[i]) == 1) ? 1 : 0;
        }

        System.out.println(result);
    }
}