import java.util.Scanner;

public 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());
    sc.close();
  }
} import java.util.Scanner; Scanner java.util public 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());
    sc.close();
  }
} 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());
    sc.close();
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    s = s.replaceAll("0","");
    System.out.println(s.length());
    sc.close();
  } 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 sc.close() sc.close sc String[] args args public 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());
    sc.close();
  }
} public 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());
    sc.close();
  }
} Main
import java.util.Scanner;

public 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());
    sc.close();
  }
}