import java.util.Scanner;

//-------------------------
// 
//-------------------------

public class Main {
    public static void main(String[] args) {
        
        char[] s = new char[3];
        int output=0;

        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        scan.close();

        for(int i=0; i<3; i++)
        {
            s[i] = S.charAt(i);
            if(s[i]=='1') output++;
        }

        System.out.println(output);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        
        char[] s = new char[3];
        int output=0;

        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        scan.close();

        for(int i=0; i<3; i++)
        {
            s[i] = S.charAt(i);
            if(s[i]=='1') output++;
        }

        System.out.println(output);
    }
} Main public static void main(String[] args) {
        
        char[] s = new char[3];
        int output=0;

        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        scan.close();

        for(int i=0; i<3; i++)
        {
            s[i] = S.charAt(i);
            if(s[i]=='1') output++;
        }

        System.out.println(output);
    } main {
        
        char[] s = new char[3];
        int output=0;

        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        scan.close();

        for(int i=0; i<3; i++)
        {
            s[i] = S.charAt(i);
            if(s[i]=='1') output++;
        }

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

        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        scan.close();

        for(int i=0; i<3; i++)
        {
            s[i] = S.charAt(i);
            if(s[i]=='1') output++;
        }

        System.out.println(output);
    }
} public class Main {
    public static void main(String[] args) {
        
        char[] s = new char[3];
        int output=0;

        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        scan.close();

        for(int i=0; i<3; i++)
        {
            s[i] = S.charAt(i);
            if(s[i]=='1') output++;
        }

        System.out.println(output);
    }
} Main
import java.util.Scanner;

//-------------------------
// 
//-------------------------

public class Main {
    public static void main(String[] args) {
        
        char[] s = new char[3];
        int output=0;

        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        scan.close();

        for(int i=0; i<3; i++)
        {
            s[i] = S.charAt(i);
            if(s[i]=='1') output++;
        }

        System.out.println(output);
    }
}