import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
      	int count = 0;
      	for(int i = 0 ; i < 3 ; i++){
         if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         }
        }          
            System.out.print(count);
    }
}
 import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
      	int count = 0;
      	for(int i = 0 ; i < 3 ; i++){
         if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         }
        }          
            System.out.print(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
      	int count = 0;
      	for(int i = 0 ; i < 3 ; i++){
         if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         }
        }          
            System.out.print(count);
    } main {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
      	int count = 0;
      	for(int i = 0 ; i < 3 ; i++){
         if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         }
        }          
            System.out.print(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc int count = 0; count 0 for(int i = 0 ; i < 3 ; i++){
         if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         }
        } int i = 0 ; int i = 0 ; i 0 i < 3 i 3 i++ i++ i {
         if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         }
        } {
         if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         }
        } if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         } a.substring(i,i+1).equals("1") a.substring(i,i+1).equals a.substring(i,i+1) a.substring a i i+1 i 1 "1" {
  			count ++ ;       
         } count ++ count System.out.print(count) System.out.print System.out System System.out count String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
      	int count = 0;
      	for(int i = 0 ; i < 3 ; i++){
         if(a.substring(i,i+1).equals("1")){
  			count ++ ;       
         }
        }          
            System.out.print(count);
    }
}

