import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int o = 0 ;
    for(int i=0; i < a.length(); i++ ){
        if(a.charAt(i) == '1'){
            o++;
        } ;
    }
        System.out.println(o);
        sc.close();
    }    
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int o = 0 ;
    for(int i=0; i < a.length(); i++ ){
        if(a.charAt(i) == '1'){
            o++;
        } ;
    }
        System.out.println(o);
        sc.close();
    }    
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int o = 0 ;
    for(int i=0; i < a.length(); i++ ){
        if(a.charAt(i) == '1'){
            o++;
        } ;
    }
        System.out.println(o);
        sc.close();
    } main {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int o = 0 ;
    for(int i=0; i < a.length(); i++ ){
        if(a.charAt(i) == '1'){
            o++;
        } ;
    }
        System.out.println(o);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc int o = 0 ; o 0 for(int i=0; i < a.length(); i++ ){
        if(a.charAt(i) == '1'){
            o++;
        } ;
    } int i=0; int i=0; i 0 i < a.length() i a.length() a.length a i++ i++ i {
        if(a.charAt(i) == '1'){
            o++;
        } ;
    } {
        if(a.charAt(i) == '1'){
            o++;
        } ;
    } if(a.charAt(i) == '1'){
            o++;
        } a.charAt(i) == '1' a.charAt(i) a.charAt a i '1' {
            o++;
        } o++ o System.out.println(o) System.out.println System.out System System.out o sc.close() sc.close sc String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int o = 0 ;
    for(int i=0; i < a.length(); i++ ){
        if(a.charAt(i) == '1'){
            o++;
        } ;
    }
        System.out.println(o);
        sc.close();
    }    
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int o = 0 ;
    for(int i=0; i < a.length(); i++ ){
        if(a.charAt(i) == '1'){
            o++;
        } ;
    }
        System.out.println(o);
        sc.close();
    }    
} Main
import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int o = 0 ;
    for(int i=0; i < a.length(); i++ ){
        if(a.charAt(i) == '1'){
            o++;
        } ;
    }
        System.out.println(o);
        sc.close();
    }    
}
