import java.util.*;
public class Main {
	public static void main(String[] args){
    	int x=0;
        int b;
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String data[] = a.split("");
      		for(int i= 0; i < data.length; i++){
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		}
    System.out.println(x);
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
    	int x=0;
        int b;
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String data[] = a.split("");
      		for(int i= 0; i < data.length; i++){
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		}
    System.out.println(x);
    }
} Main public static void main(String[] args){
    	int x=0;
        int b;
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String data[] = a.split("");
      		for(int i= 0; i < data.length; i++){
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		}
    System.out.println(x);
    } main {
    	int x=0;
        int b;
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String data[] = a.split("");
      		for(int i= 0; i < data.length; i++){
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		}
    System.out.println(x);
    } int x=0; x 0 int b; b Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String data[] = a.split(""); data a.split("") a.split a "" for(int i= 0; i < data.length; i++){
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		} int i= 0; int i= 0; i 0 i < data.length i data.length data data.length i++ i++ i {
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		} {
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		} b=Integer.parseInt(data[i]) b Integer.parseInt(data[i]) Integer.parseInt Integer data[i] data i if(b==1){
        			x=x+1;
      			} b==1 b 1 {
        			x=x+1;
      			} x=x+1 x x+1 x 1 System.out.println(x) System.out.println System.out System System.out x String[] args args public class Main {
	public static void main(String[] args){
    	int x=0;
        int b;
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String data[] = a.split("");
      		for(int i= 0; i < data.length; i++){
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		}
    System.out.println(x);
    }
} public class Main {
	public static void main(String[] args){
    	int x=0;
        int b;
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String data[] = a.split("");
      		for(int i= 0; i < data.length; i++){
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		}
    System.out.println(x);
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
    	int x=0;
        int b;
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
    	String data[] = a.split("");
      		for(int i= 0; i < data.length; i++){
                b=Integer.parseInt(data[i]);
      			if(b==1){
        			x=x+1;
      			}
    		}
    System.out.println(x);
    }
}