import java.util.Scanner;

public class Main
{
    public static void main(String[] args) 
    {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        String one = "1";
        int output=0;

        String[] sr = s.split("");

        if(sr[0].equals(one))
        {
            output++;
        }
        if(sr[1].equals(one))
        {
            output++;
        }
        if(sr[2].equals(one))
        {
            output++;
        }
        System.out.println(output);
    }
} import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String[] args) 
    {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        String one = "1";
        int output=0;

        String[] sr = s.split("");

        if(sr[0].equals(one))
        {
            output++;
        }
        if(sr[1].equals(one))
        {
            output++;
        }
        if(sr[2].equals(one))
        {
            output++;
        }
        System.out.println(output);
    }
} Main public static void main(String[] args) 
    {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        String one = "1";
        int output=0;

        String[] sr = s.split("");

        if(sr[0].equals(one))
        {
            output++;
        }
        if(sr[1].equals(one))
        {
            output++;
        }
        if(sr[2].equals(one))
        {
            output++;
        }
        System.out.println(output);
    } main {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        String one = "1";
        int output=0;

        String[] sr = s.split("");

        if(sr[0].equals(one))
        {
            output++;
        }
        if(sr[1].equals(one))
        {
            output++;
        }
        if(sr[2].equals(one))
        {
            output++;
        }
        System.out.println(output);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan String one = "1"; one "1" int output=0; output 0 String[] sr = s.split(""); sr s.split("") s.split s "" if(sr[0].equals(one))
        {
            output++;
        } sr[0].equals(one) sr[0].equals sr[0] sr 0 one {
            output++;
        } output++ output if(sr[1].equals(one))
        {
            output++;
        } sr[1].equals(one) sr[1].equals sr[1] sr 1 one {
            output++;
        } output++ output if(sr[2].equals(one))
        {
            output++;
        } sr[2].equals(one) sr[2].equals sr[2] sr 2 one {
            output++;
        } output++ output System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main
{
    public static void main(String[] args) 
    {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        String one = "1";
        int output=0;

        String[] sr = s.split("");

        if(sr[0].equals(one))
        {
            output++;
        }
        if(sr[1].equals(one))
        {
            output++;
        }
        if(sr[2].equals(one))
        {
            output++;
        }
        System.out.println(output);
    }
} public class Main
{
    public static void main(String[] args) 
    {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        String one = "1";
        int output=0;

        String[] sr = s.split("");

        if(sr[0].equals(one))
        {
            output++;
        }
        if(sr[1].equals(one))
        {
            output++;
        }
        if(sr[2].equals(one))
        {
            output++;
        }
        System.out.println(output);
    }
} Main
import java.util.Scanner;

public class Main
{
    public static void main(String[] args) 
    {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        String one = "1";
        int output=0;

        String[] sr = s.split("");

        if(sr[0].equals(one))
        {
            output++;
        }
        if(sr[1].equals(one))
        {
            output++;
        }
        if(sr[2].equals(one))
        {
            output++;
        }
        System.out.println(output);
    }
}