import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());

        int b = a % 10;
        int c = a / 10 % 10;
        int d = a / 100 % 10;

        System.out.println(b + c + d);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());

        int b = a % 10;
        int c = a / 10 % 10;
        int d = a / 100 % 10;

        System.out.println(b + c + d);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());

        int b = a % 10;
        int c = a / 10 % 10;
        int d = a / 100 % 10;

        System.out.println(b + c + d);
    } main {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());

        int b = a % 10;
        int c = a / 10 % 10;
        int d = a / 100 % 10;

        System.out.println(b + c + d);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = Integer.parseInt(scan.next()); a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int b = a % 10; b a % 10 a 10 int c = a / 10 % 10; c a / 10 % 10 a / 10 a 10 10 int d = a / 100 % 10; d a / 100 % 10 a / 100 a 100 10 System.out.println(b + c + d) System.out.println System.out System System.out b + c + d b + c + d b c d String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = Integer.parseInt(scan.next());

        int b = a % 10;
        int c = a / 10 % 10;
        int d = a / 100 % 10;

        System.out.println(b + c + d);
    }
}