import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;

        int s = scanner.nextInt();

        for (int i = 1; i <= 100; i *= 10) {
            if (s / i % 10 == 1) {
                count++;
            }
        }

        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;

        int s = scanner.nextInt();

        for (int i = 1; i <= 100; i *= 10) {
            if (s / i % 10 == 1) {
                count++;
            }
        }

        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;

        int s = scanner.nextInt();

        for (int i = 1; i <= 100; i *= 10) {
            if (s / i % 10 == 1) {
                count++;
            }
        }

        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);
        int count = 0;

        int s = scanner.nextInt();

        for (int i = 1; i <= 100; i *= 10) {
            if (s / i % 10 == 1) {
                count++;
            }
        }

        System.out.println(count);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int count = 0; count 0 int s = scanner.nextInt(); s scanner.nextInt() scanner.nextInt scanner for (int i = 1; i <= 100; i *= 10) {
            if (s / i % 10 == 1) {
                count++;
            }
        } int i = 1; int i = 1; i 1 i <= 100 i 100 i *= 10 i *= 10 i 10 {
            if (s / i % 10 == 1) {
                count++;
            }
        } {
            if (s / i % 10 == 1) {
                count++;
            }
        } if (s / i % 10 == 1) {
                count++;
            } s / i % 10 == 1 s / i % 10 s / i s i 10 1 {
                count++;
            } count++ 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) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;

        int s = scanner.nextInt();

        for (int i = 1; i <= 100; i *= 10) {
            if (s / i % 10 == 1) {
                count++;
            }
        }

        System.out.println(count);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;

        int s = scanner.nextInt();

        for (int i = 1; i <= 100; i *= 10) {
            if (s / i % 10 == 1) {
                count++;
            }
        }

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

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;

        int s = scanner.nextInt();

        for (int i = 1; i <= 100; i *= 10) {
            if (s / i % 10 == 1) {
                count++;
            }
        }

        System.out.println(count);
    }
}