import java.util.Scanner;

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

        for(int i = 0; i < 3; i++){
            if(s.charAt(i) == '1') x++;
        }

        System.out.println(x);

        sc.close();
    }
} 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.nextLine();
        int x = 0;

        for(int i = 0; i < 3; i++){
            if(s.charAt(i) == '1') x++;
        }

        System.out.println(x);

        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        String s = sc.nextLine();
        int x = 0;

        for(int i = 0; i < 3; i++){
            if(s.charAt(i) == '1') x++;
        }

        System.out.println(x);

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.nextLine();
        int x = 0;

        for(int i = 0; i < 3; i++){
            if(s.charAt(i) == '1') x++;
        }

        System.out.println(x);

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

        for(int i = 0; i < 3; i++){
            if(s.charAt(i) == '1') x++;
        }

        System.out.println(x);

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

        for(int i = 0; i < 3; i++){
            if(s.charAt(i) == '1') x++;
        }

        System.out.println(x);

        sc.close();
    }
} Main
import java.util.Scanner;

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

        for(int i = 0; i < 3; i++){
            if(s.charAt(i) == '1') x++;
        }

        System.out.println(x);

        sc.close();
    }
}