import java.util.Scanner;

public class Main
{
    // https://atcoder.jp/contests/abc081/tasks/abc081_a
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        int answer = 0;
        for (char c : input.toCharArray()) {
            answer += c == '1' ? 1 : 0;
        }
        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util public class Main
{
    // https://atcoder.jp/contests/abc081/tasks/abc081_a
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        int answer = 0;
        for (char c : input.toCharArray()) {
            answer += c == '1' ? 1 : 0;
        }
        System.out.println(answer);
    }
} Main // https://atcoder.jp/contests/abc081/tasks/abc081_a
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        int answer = 0;
        for (char c : input.toCharArray()) {
            answer += c == '1' ? 1 : 0;
        }
        System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        int answer = 0;
        for (char c : input.toCharArray()) {
            answer += c == '1' ? 1 : 0;
        }
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc int answer = 0; answer 0 for (char c : input.toCharArray()) {
            answer += c == '1' ? 1 : 0;
        } char c input.toCharArray() input.toCharArray input {
            answer += c == '1' ? 1 : 0;
        } {
            answer += c == '1' ? 1 : 0;
        } answer += c == '1' ? 1 : 0 answer c == '1' ? 1 : 0 c == '1' c '1' 1 0 System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main
{
    // https://atcoder.jp/contests/abc081/tasks/abc081_a
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        int answer = 0;
        for (char c : input.toCharArray()) {
            answer += c == '1' ? 1 : 0;
        }
        System.out.println(answer);
    }
} public class Main
{
    // https://atcoder.jp/contests/abc081/tasks/abc081_a
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        int answer = 0;
        for (char c : input.toCharArray()) {
            answer += c == '1' ? 1 : 0;
        }
        System.out.println(answer);
    }
} Main
import java.util.Scanner;

public class Main
{
    // https://atcoder.jp/contests/abc081/tasks/abc081_a
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        String input = sc.next();
        int answer = 0;
        for (char c : input.toCharArray()) {
            answer += c == '1' ? 1 : 0;
        }
        System.out.println(answer);
    }
}
