import java.util.Scanner;

class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        int ans = 0;
        String s = sc.next();
        for (Character c : s.toCharArray()) {
            if (c.equals('1'))
                ans++;
        }

        System.out.println(ans);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        int ans = 0;
        String s = sc.next();
        for (Character c : s.toCharArray()) {
            if (c.equals('1'))
                ans++;
        }

        System.out.println(ans);
        sc.close();
    }
} Main public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        int ans = 0;
        String s = sc.next();
        for (Character c : s.toCharArray()) {
            if (c.equals('1'))
                ans++;
        }

        System.out.println(ans);
        sc.close();
    } main {

        Scanner sc = new Scanner(System.in);

        int ans = 0;
        String s = sc.next();
        for (Character c : s.toCharArray()) {
            if (c.equals('1'))
                ans++;
        }

        System.out.println(ans);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int ans = 0; ans 0 String s = sc.next(); s sc.next() sc.next sc for (Character c : s.toCharArray()) {
            if (c.equals('1'))
                ans++;
        } Character c s.toCharArray() s.toCharArray s {
            if (c.equals('1'))
                ans++;
        } {
            if (c.equals('1'))
                ans++;
        } if (c.equals('1'))
                ans++; c.equals('1') c.equals c '1' ans++ ans System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);

        int ans = 0;
        String s = sc.next();
        for (Character c : s.toCharArray()) {
            if (c.equals('1'))
                ans++;
        }

        System.out.println(ans);
        sc.close();
    }
}
