import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;

class Main {

    public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> marblesPlace = Arrays.asList(br.readLine().split(""));

            int countMarble = 0;
            for (String marble : marblesPlace) {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            }

            System.out.println(countMarble);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.List; List java.util class Main {

    public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> marblesPlace = Arrays.asList(br.readLine().split(""));

            int countMarble = 0;
            for (String marble : marblesPlace) {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            }

            System.out.println(countMarble);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
} Main public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> marblesPlace = Arrays.asList(br.readLine().split(""));

            int countMarble = 0;
            for (String marble : marblesPlace) {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            }

            System.out.println(countMarble);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } main {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> marblesPlace = Arrays.asList(br.readLine().split(""));

            int countMarble = 0;
            for (String marble : marblesPlace) {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            }

            System.out.println(countMarble);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    } try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> marblesPlace = Arrays.asList(br.readLine().split(""));

            int countMarble = 0;
            for (String marble : marblesPlace) {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            }

            System.out.println(countMarble);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } IOException | NumberFormatException e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        } final Exception e {
            e.printStackTrace();
            System.exit(0);
        } e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> marblesPlace = Arrays.asList(br.readLine().split(""));

            int countMarble = 0;
            for (String marble : marblesPlace) {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            }

            System.out.println(countMarble);
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) List<String> marblesPlace = Arrays.asList(br.readLine().split("")); marblesPlace Arrays.asList(br.readLine().split("")) Arrays.asList Arrays br.readLine().split("") br.readLine().split br.readLine() br.readLine br "" int countMarble = 0; countMarble 0 for (String marble : marblesPlace) {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            } String marble marblesPlace {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            } {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            } if (marble.equals("1")) {
                    countMarble += 1;
                } marble.equals("1") marble.equals marble "1" {
                    countMarble += 1;
                } countMarble += 1 countMarble 1 System.out.println(countMarble) System.out.println System.out System System.out countMarble String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;

class Main {

    public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> marblesPlace = Arrays.asList(br.readLine().split(""));

            int countMarble = 0;
            for (String marble : marblesPlace) {
                if (marble.equals("1")) {
                    countMarble += 1;
                }
            }

            System.out.println(countMarble);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
}