import java.util.*;

public class Main {
  public static void main(String[] args) {
    @SuppressWarnings("resource")
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int count = 0;

    for (char c : str.toCharArray()) {
      count = (c == '1') ? count + 1 : count;
    }

    System.out.println(count);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    @SuppressWarnings("resource")
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int count = 0;

    for (char c : str.toCharArray()) {
      count = (c == '1') ? count + 1 : count;
    }

    System.out.println(count);
  }
} Main public static void main(String[] args) {
    @SuppressWarnings("resource")
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int count = 0;

    for (char c : str.toCharArray()) {
      count = (c == '1') ? count + 1 : count;
    }

    System.out.println(count);
  } main {
    @SuppressWarnings("resource")
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int count = 0;

    for (char c : str.toCharArray()) {
      count = (c == '1') ? count + 1 : count;
    }

    System.out.println(count);
  } @SuppressWarnings("resource")
    Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int count = 0; count 0 for (char c : str.toCharArray()) {
      count = (c == '1') ? count + 1 : count;
    } char c str.toCharArray() str.toCharArray str {
      count = (c == '1') ? count + 1 : count;
    } {
      count = (c == '1') ? count + 1 : count;
    } count = (c == '1') ? count + 1 : count count (c == '1') ? count + 1 : count (c == '1') c '1' count + 1 count 1 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) {
    @SuppressWarnings("resource")
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int count = 0;

    for (char c : str.toCharArray()) {
      count = (c == '1') ? count + 1 : count;
    }

    System.out.println(count);
  }
} public class Main {
  public static void main(String[] args) {
    @SuppressWarnings("resource")
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int count = 0;

    for (char c : str.toCharArray()) {
      count = (c == '1') ? count + 1 : count;
    }

    System.out.println(count);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    @SuppressWarnings("resource")
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int count = 0;

    for (char c : str.toCharArray()) {
      count = (c == '1') ? count + 1 : count;
    }

    System.out.println(count);
  }
}