import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

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

        String s = sc.next();
        int sum = 0;
        char[] si = new char[3];
        for (int i = 0; i < 3; i++) {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        }
        System.out.println(sum);


    }
}



 import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int sum = 0;
        char[] si = new char[3];
        for (int i = 0; i < 3; i++) {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        }
        System.out.println(sum);


    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int sum = 0;
        char[] si = new char[3];
        for (int i = 0; i < 3; i++) {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        }
        System.out.println(sum);


    } main {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int sum = 0;
        char[] si = new char[3];
        for (int i = 0; i < 3; i++) {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        }
        System.out.println(sum);


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int sum = 0; sum 0 char[] si = new char[3]; si new char[3] 3 for (int i = 0; i < 3; i++) {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        } {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        } si[i] = s.charAt(i) si[i] si i s.charAt(i) s.charAt s i if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            } si[i] == Integer.toString(1).charAt(0) si[i] si i Integer.toString(1).charAt(0) Integer.toString(1).charAt Integer.toString(1) Integer.toString Integer 1 0 {
                sum++;
            } sum++ sum System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int sum = 0;
        char[] si = new char[3];
        for (int i = 0; i < 3; i++) {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        }
        System.out.println(sum);


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

        String s = sc.next();
        int sum = 0;
        char[] si = new char[3];
        for (int i = 0; i < 3; i++) {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        }
        System.out.println(sum);


    }
} Main
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

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

        String s = sc.next();
        int sum = 0;
        char[] si = new char[3];
        for (int i = 0; i < 3; i++) {
            si[i] = s.charAt(i);
            if (si[i] == Integer.toString(1).charAt(0)) {
                sum++;
            }
        }
        System.out.println(sum);


    }
}




