import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String abc = sc.next();
        char ONE = '1';
        int cnt = 0;
        for (char s : abc.toCharArray()) {
            if(ONE == s) {
                cnt++;
            }
        }
        System.out.println(cnt);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String abc = sc.next();
        char ONE = '1';
        int cnt = 0;
        for (char s : abc.toCharArray()) {
            if(ONE == s) {
                cnt++;
            }
        }
        System.out.println(cnt);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String abc = sc.next();
        char ONE = '1';
        int cnt = 0;
        for (char s : abc.toCharArray()) {
            if(ONE == s) {
                cnt++;
            }
        }
        System.out.println(cnt);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        String abc = sc.next();
        char ONE = '1';
        int cnt = 0;
        for (char s : abc.toCharArray()) {
            if(ONE == s) {
                cnt++;
            }
        }
        System.out.println(cnt);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String abc = sc.next(); abc sc.next() sc.next sc char ONE = '1'; ONE '1' int cnt = 0; cnt 0 for (char s : abc.toCharArray()) {
            if(ONE == s) {
                cnt++;
            }
        } char s abc.toCharArray() abc.toCharArray abc {
            if(ONE == s) {
                cnt++;
            }
        } {
            if(ONE == s) {
                cnt++;
            }
        } if(ONE == s) {
                cnt++;
            } ONE == s ONE s {
                cnt++;
            } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String abc = sc.next();
        char ONE = '1';
        int cnt = 0;
        for (char s : abc.toCharArray()) {
            if(ONE == s) {
                cnt++;
            }
        }
        System.out.println(cnt);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String abc = sc.next();
        char ONE = '1';
        int cnt = 0;
        for (char s : abc.toCharArray()) {
            if(ONE == s) {
                cnt++;
            }
        }
        System.out.println(cnt);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String abc = sc.next();
        char ONE = '1';
        int cnt = 0;
        for (char s : abc.toCharArray()) {
            if(ONE == s) {
                cnt++;
            }
        }
        System.out.println(cnt);
        sc.close();
    }
}