import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    String[] list = scanner.next().split("");
    int count = 0;
    for (String s : list) {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    }

    System.out.println(count);

    scanner.close();
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    String[] list = scanner.next().split("");
    int count = 0;
    for (String s : list) {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    }

    System.out.println(count);

    scanner.close();
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    String[] list = scanner.next().split("");
    int count = 0;
    for (String s : list) {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    }

    System.out.println(count);

    scanner.close();
  } main {
    Scanner scanner = new Scanner(System.in);

    String[] list = scanner.next().split("");
    int count = 0;
    for (String s : list) {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    }

    System.out.println(count);

    scanner.close();
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] list = scanner.next().split(""); list scanner.next().split("") scanner.next().split scanner.next() scanner.next scanner "" int count = 0; count 0 for (String s : list) {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    } String s list {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    } {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    } if (Integer.parseInt(s) == 1) {
        count++;
      } Integer.parseInt(s) == 1 Integer.parseInt(s) Integer.parseInt Integer s 1 {
        count++;
      } count++ count System.out.println(count) System.out.println System.out System System.out count scanner.close() scanner.close scanner String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    String[] list = scanner.next().split("");
    int count = 0;
    for (String s : list) {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    }

    System.out.println(count);

    scanner.close();
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    String[] list = scanner.next().split("");
    int count = 0;
    for (String s : list) {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    }

    System.out.println(count);

    scanner.close();
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    String[] list = scanner.next().split("");
    int count = 0;
    for (String s : list) {
      if (Integer.parseInt(s) == 1) {
        count++;
      }
    }

    System.out.println(count);

    scanner.close();
  }
}
