import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    System.out.println(sc.next().replace("0", "").length());
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    System.out.println(sc.next().replace("0", "").length());
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    System.out.println(sc.next().replace("0", "").length());
  } main {
    Scanner sc = new Scanner(System.in);
    System.out.println(sc.next().replace("0", "").length());
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) System.out.println(sc.next().replace("0", "").length()) System.out.println System.out System System.out sc.next().replace("0", "").length() sc.next().replace("0", "").length sc.next().replace("0", "") sc.next().replace sc.next() sc.next sc "0" "" String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    System.out.println(sc.next().replace("0", "").length());
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    System.out.println(sc.next().replace("0", "").length());
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    System.out.println(sc.next().replace("0", "").length());
  }
}