import java.util.*;
public class Main{
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        String x = scanner.nextLine();
        int r = 3;
        int s = 0;

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

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

        for(int i = 0;i < r;i++){
            if(x.charAt(i) == '1'){
                s++;
            }
        }
        System.out.println(s);
    } main {
        Scanner scanner = new Scanner(System.in);
        String x = scanner.nextLine();
        int r = 3;
        int s = 0;

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

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

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

        for(int i = 0;i < r;i++){
            if(x.charAt(i) == '1'){
                s++;
            }
        }
        System.out.println(s);
    }
}