import java.util.Scanner;
 
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    String[] strAry = str.split("");
    
    int count = 0;
    if(strAry[0].equals("1")) count++;
    if(strAry[1].equals("1")) count++;
    if(strAry[2].equals("1")) count++;    
    System.out.println(count);
    
    return;
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    String[] strAry = str.split("");
    
    int count = 0;
    if(strAry[0].equals("1")) count++;
    if(strAry[1].equals("1")) count++;
    if(strAry[2].equals("1")) count++;    
    System.out.println(count);
    
    return;
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    String[] strAry = str.split("");
    
    int count = 0;
    if(strAry[0].equals("1")) count++;
    if(strAry[1].equals("1")) count++;
    if(strAry[2].equals("1")) count++;    
    System.out.println(count);
    
    return;
  } main {
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    String[] strAry = str.split("");
    
    int count = 0;
    if(strAry[0].equals("1")) count++;
    if(strAry[1].equals("1")) count++;
    if(strAry[2].equals("1")) count++;    
    System.out.println(count);
    
    return;
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc String[] strAry = str.split(""); strAry str.split("") str.split str "" int count = 0; count 0 if(strAry[0].equals("1")) count++; strAry[0].equals("1") strAry[0].equals strAry[0] strAry 0 "1" count++ count if(strAry[1].equals("1")) count++; strAry[1].equals("1") strAry[1].equals strAry[1] strAry 1 "1" count++ count if(strAry[2].equals("1")) count++; strAry[2].equals("1") strAry[2].equals strAry[2] strAry 2 "1" count++ count System.out.println(count) System.out.println System.out System System.out count return; String[] args args
import java.util.Scanner;
 
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    String[] strAry = str.split("");
    
    int count = 0;
    if(strAry[0].equals("1")) count++;
    if(strAry[1].equals("1")) count++;
    if(strAry[2].equals("1")) count++;    
    System.out.println(count);
    
    return;
  }
}