import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner scan = new Scanner(System.in);
        
        String s = scan.nextLine();
        
        String s1 = s.substring(0 , 1);
        String s2 = s.substring(1 , 2);
        String s3 = s.substring(2 , 3);
        
        int count = 0;
        
        if (s1.equals("1")) {
            count++;
        } if (s2.equals("1")) {
            count++;
        } if (s3.equals("1")) {
            count++;
        }
        
        System.out.println(count);
    }
    
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner scan = new Scanner(System.in);
        
        String s = scan.nextLine();
        
        String s1 = s.substring(0 , 1);
        String s2 = s.substring(1 , 2);
        String s3 = s.substring(2 , 3);
        
        int count = 0;
        
        if (s1.equals("1")) {
            count++;
        } if (s2.equals("1")) {
            count++;
        } if (s3.equals("1")) {
            count++;
        }
        
        System.out.println(count);
    }
    
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner scan = new Scanner(System.in);
        
        String s = scan.nextLine();
        
        String s1 = s.substring(0 , 1);
        String s2 = s.substring(1 , 2);
        String s3 = s.substring(2 , 3);
        
        int count = 0;
        
        if (s1.equals("1")) {
            count++;
        } if (s2.equals("1")) {
            count++;
        } if (s3.equals("1")) {
            count++;
        }
        
        System.out.println(count);
    } main {
        // Your code here!
        
        Scanner scan = new Scanner(System.in);
        
        String s = scan.nextLine();
        
        String s1 = s.substring(0 , 1);
        String s2 = s.substring(1 , 2);
        String s3 = s.substring(2 , 3);
        
        int count = 0;
        
        if (s1.equals("1")) {
            count++;
        } if (s2.equals("1")) {
            count++;
        } if (s3.equals("1")) {
            count++;
        }
        
        System.out.println(count);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.nextLine(); s scan.nextLine() scan.nextLine scan String s1 = s.substring(0 , 1); s1 s.substring(0 , 1) s.substring s 0 1 String s2 = s.substring(1 , 2); s2 s.substring(1 , 2) s.substring s 1 2 String s3 = s.substring(2 , 3); s3 s.substring(2 , 3) s.substring s 2 3 int count = 0; count 0 if (s1.equals("1")) {
            count++;
        } s1.equals("1") s1.equals s1 "1" {
            count++;
        } count++ count if (s2.equals("1")) {
            count++;
        } s2.equals("1") s2.equals s2 "1" {
            count++;
        } count++ count if (s3.equals("1")) {
            count++;
        } s3.equals("1") s3.equals s3 "1" {
            count++;
        } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner scan = new Scanner(System.in);
        
        String s = scan.nextLine();
        
        String s1 = s.substring(0 , 1);
        String s2 = s.substring(1 , 2);
        String s3 = s.substring(2 , 3);
        
        int count = 0;
        
        if (s1.equals("1")) {
            count++;
        } if (s2.equals("1")) {
            count++;
        } if (s3.equals("1")) {
            count++;
        }
        
        System.out.println(count);
    }
    
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner scan = new Scanner(System.in);
        
        String s = scan.nextLine();
        
        String s1 = s.substring(0 , 1);
        String s2 = s.substring(1 , 2);
        String s3 = s.substring(2 , 3);
        
        int count = 0;
        
        if (s1.equals("1")) {
            count++;
        } if (s2.equals("1")) {
            count++;
        } if (s3.equals("1")) {
            count++;
        }
        
        System.out.println(count);
    }
    
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner scan = new Scanner(System.in);
        
        String s = scan.nextLine();
        
        String s1 = s.substring(0 , 1);
        String s2 = s.substring(1 , 2);
        String s3 = s.substring(2 , 3);
        
        int count = 0;
        
        if (s1.equals("1")) {
            count++;
        } if (s2.equals("1")) {
            count++;
        } if (s3.equals("1")) {
            count++;
        }
        
        System.out.println(count);
    }
    
}