

    





import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    char[] c = s.toCharArray();
    int ans = 0;
    for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    char[] c = s.toCharArray();
    int ans = 0;
    for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    char[] c = s.toCharArray();
    int ans = 0;
    for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    }
    System.out.println(ans);
  } main {
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    char[] c = s.toCharArray();
    int ans = 0;
    for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    }
    System.out.println(ans);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s int ans = 0; ans 0 for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    } char ch c {
      if (ch == '1') {
        ans++;
      }
    } {
      if (ch == '1') {
        ans++;
      }
    } if (ch == '1') {
        ans++;
      } ch == '1' ch '1' {
        ans++;
      } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    char[] c = s.toCharArray();
    int ans = 0;
    for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    char[] c = s.toCharArray();
    int ans = 0;
    for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    }
    System.out.println(ans);
  }
} Main


    





import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    char[] c = s.toCharArray();
    int ans = 0;
    for (char ch: c) {
      if (ch == '1') {
        ans++;
      }
    }
    System.out.println(ans);
  }
}