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