import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String token = sc.next();
        String[] strArray = token.split("");

        int result = 0;

        if (strArray[0].equals("1")) {
            result++;
        }

        if (strArray[1].equals("1")) {
            result += 1;
        }

        if (strArray[2].equals("1")) {
            result += 1;
        }

        System.out.println(result);

        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String token = sc.next();
        String[] strArray = token.split("");

        int result = 0;

        if (strArray[0].equals("1")) {
            result++;
        }

        if (strArray[1].equals("1")) {
            result += 1;
        }

        if (strArray[2].equals("1")) {
            result += 1;
        }

        System.out.println(result);

        sc.close();
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String token = sc.next();
        String[] strArray = token.split("");

        int result = 0;

        if (strArray[0].equals("1")) {
            result++;
        }

        if (strArray[1].equals("1")) {
            result += 1;
        }

        if (strArray[2].equals("1")) {
            result += 1;
        }

        System.out.println(result);

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String token = sc.next();
        String[] strArray = token.split("");

        int result = 0;

        if (strArray[0].equals("1")) {
            result++;
        }

        if (strArray[1].equals("1")) {
            result += 1;
        }

        if (strArray[2].equals("1")) {
            result += 1;
        }

        System.out.println(result);

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String token = sc.next(); token sc.next() sc.next sc String[] strArray = token.split(""); strArray token.split("") token.split token "" int result = 0; result 0 if (strArray[0].equals("1")) {
            result++;
        } strArray[0].equals("1") strArray[0].equals strArray[0] strArray 0 "1" {
            result++;
        } result++ result if (strArray[1].equals("1")) {
            result += 1;
        } strArray[1].equals("1") strArray[1].equals strArray[1] strArray 1 "1" {
            result += 1;
        } result += 1 result 1 if (strArray[2].equals("1")) {
            result += 1;
        } strArray[2].equals("1") strArray[2].equals strArray[2] strArray 2 "1" {
            result += 1;
        } result += 1 result 1 System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String token = sc.next();
        String[] strArray = token.split("");

        int result = 0;

        if (strArray[0].equals("1")) {
            result++;
        }

        if (strArray[1].equals("1")) {
            result += 1;
        }

        if (strArray[2].equals("1")) {
            result += 1;
        }

        System.out.println(result);

        sc.close();
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String token = sc.next();
        String[] strArray = token.split("");

        int result = 0;

        if (strArray[0].equals("1")) {
            result++;
        }

        if (strArray[1].equals("1")) {
            result += 1;
        }

        if (strArray[2].equals("1")) {
            result += 1;
        }

        System.out.println(result);

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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String token = sc.next();
        String[] strArray = token.split("");

        int result = 0;

        if (strArray[0].equals("1")) {
            result++;
        }

        if (strArray[1].equals("1")) {
            result += 1;
        }

        if (strArray[2].equals("1")) {
            result += 1;
        }

        System.out.println(result);

        sc.close();
    }
}
