import java.util.*;

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

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