import java.util.*;


public class Main {
    public static void main(String[] args){

        Scanner s = new Scanner(System.in);
        String n = s.next();

        int count = 0;
        for (String c : n.split("")) {
          if (c.equals("1")) {
            count++;
          }
        }

        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){

        Scanner s = new Scanner(System.in);
        String n = s.next();

        int count = 0;
        for (String c : n.split("")) {
          if (c.equals("1")) {
            count++;
          }
        }

        System.out.println(count);
    }
} Main public static void main(String[] args){

        Scanner s = new Scanner(System.in);
        String n = s.next();

        int count = 0;
        for (String c : n.split("")) {
          if (c.equals("1")) {
            count++;
          }
        }

        System.out.println(count);
    } main {

        Scanner s = new Scanner(System.in);
        String n = s.next();

        int count = 0;
        for (String c : n.split("")) {
          if (c.equals("1")) {
            count++;
          }
        }

        System.out.println(count);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) String n = s.next(); n s.next() s.next s int count = 0; count 0 for (String c : n.split("")) {
          if (c.equals("1")) {
            count++;
          }
        } String c n.split("") n.split n "" {
          if (c.equals("1")) {
            count++;
          }
        } {
          if (c.equals("1")) {
            count++;
          }
        } if (c.equals("1")) {
            count++;
          } c.equals("1") c.equals c "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 s = new Scanner(System.in);
        String n = s.next();

        int count = 0;
        for (String c : n.split("")) {
          if (c.equals("1")) {
            count++;
          }
        }

        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args){

        Scanner s = new Scanner(System.in);
        String n = s.next();

        int count = 0;
        for (String c : n.split("")) {
          if (c.equals("1")) {
            count++;
          }
        }

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


public class Main {
    public static void main(String[] args){

        Scanner s = new Scanner(System.in);
        String n = s.next();

        int count = 0;
        for (String c : n.split("")) {
          if (c.equals("1")) {
            count++;
          }
        }

        System.out.println(count);
    }
}