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