import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //char s[] = new char[3];
        String input = scanner.nextLine();
        int count=0;
        for (int i = 0; i < 3; i++) {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='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);
        //char s[] = new char[3];
        String input = scanner.nextLine();
        int count=0;
        for (int i = 0; i < 3; i++) {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='1'){
                count++;
            }
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //char s[] = new char[3];
        String input = scanner.nextLine();
        int count=0;
        for (int i = 0; i < 3; i++) {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='1'){
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner scanner = new Scanner(System.in);
        //char s[] = new char[3];
        String input = scanner.nextLine();
        int count=0;
        for (int i = 0; i < 3; i++) {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='1'){
                count++;
            }
        }
        System.out.println(count);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner int count=0; count 0 for (int i = 0; i < 3; i++) {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='1'){
                count++;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='1'){
                count++;
            }
        } {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='1'){
                count++;
            }
        } if(input.charAt(i)=='1'){
                count++;
            } input.charAt(i)=='1' input.charAt(i) input.charAt input i '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);
        //char s[] = new char[3];
        String input = scanner.nextLine();
        int count=0;
        for (int i = 0; i < 3; i++) {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='1'){
                count++;
            }
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        //char s[] = new char[3];
        String input = scanner.nextLine();
        int count=0;
        for (int i = 0; i < 3; i++) {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='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);
        //char s[] = new char[3];
        String input = scanner.nextLine();
        int count=0;
        for (int i = 0; i < 3; i++) {
            //s[i]=input.charAt(i);
            if(input.charAt(i)=='1'){
                count++;
            }
        }
        System.out.println(count);
    }
}