import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str_s = scan.next();
		int s1 = Integer.parseInt(str_s.charAt(0) + "");
		int s2 = Integer.parseInt(str_s.charAt(1) + "");
		int s3 = Integer.parseInt(str_s.charAt(2) + "");
		int sum = s1 + s2 + s3;
		System.out.println(sum);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str_s = scan.next();
		int s1 = Integer.parseInt(str_s.charAt(0) + "");
		int s2 = Integer.parseInt(str_s.charAt(1) + "");
		int s3 = Integer.parseInt(str_s.charAt(2) + "");
		int sum = s1 + s2 + s3;
		System.out.println(sum);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str_s = scan.next();
		int s1 = Integer.parseInt(str_s.charAt(0) + "");
		int s2 = Integer.parseInt(str_s.charAt(1) + "");
		int s3 = Integer.parseInt(str_s.charAt(2) + "");
		int sum = s1 + s2 + s3;
		System.out.println(sum);
	} main {
		Scanner scan = new Scanner(System.in);
		String str_s = scan.next();
		int s1 = Integer.parseInt(str_s.charAt(0) + "");
		int s2 = Integer.parseInt(str_s.charAt(1) + "");
		int s3 = Integer.parseInt(str_s.charAt(2) + "");
		int sum = s1 + s2 + s3;
		System.out.println(sum);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str_s = scan.next(); str_s scan.next() scan.next scan int s1 = Integer.parseInt(str_s.charAt(0) + ""); s1 Integer.parseInt(str_s.charAt(0) + "") Integer.parseInt Integer str_s.charAt(0) + "" str_s.charAt(0) str_s.charAt str_s 0 "" int s2 = Integer.parseInt(str_s.charAt(1) + ""); s2 Integer.parseInt(str_s.charAt(1) + "") Integer.parseInt Integer str_s.charAt(1) + "" str_s.charAt(1) str_s.charAt str_s 1 "" int s3 = Integer.parseInt(str_s.charAt(2) + ""); s3 Integer.parseInt(str_s.charAt(2) + "") Integer.parseInt Integer str_s.charAt(2) + "" str_s.charAt(2) str_s.charAt str_s 2 "" int sum = s1 + s2 + s3; sum s1 + s2 + s3 s1 + s2 + s3 s1 s2 s3 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str_s = scan.next();
		int s1 = Integer.parseInt(str_s.charAt(0) + "");
		int s2 = Integer.parseInt(str_s.charAt(1) + "");
		int s3 = Integer.parseInt(str_s.charAt(2) + "");
		int sum = s1 + s2 + s3;
		System.out.println(sum);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str_s = scan.next();
		int s1 = Integer.parseInt(str_s.charAt(0) + "");
		int s2 = Integer.parseInt(str_s.charAt(1) + "");
		int s3 = Integer.parseInt(str_s.charAt(2) + "");
		int sum = s1 + s2 + s3;
		System.out.println(sum);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str_s = scan.next();
		int s1 = Integer.parseInt(str_s.charAt(0) + "");
		int s2 = Integer.parseInt(str_s.charAt(1) + "");
		int s3 = Integer.parseInt(str_s.charAt(2) + "");
		int sum = s1 + s2 + s3;
		System.out.println(sum);
	}
}