import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
		
		int s1 = S % 10;
		int s2 = S / 10 % 10;
		int s3 = S / 100 % 10;
		
		System.out.println(s1 + s2 + s3);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
		
		int s1 = S % 10;
		int s2 = S / 10 % 10;
		int s3 = S / 100 % 10;
		
		System.out.println(s1 + s2 + s3);
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
		
		int s1 = S % 10;
		int s2 = S / 10 % 10;
		int s3 = S / 100 % 10;
		
		System.out.println(s1 + s2 + s3);
		
	} main {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
		
		int s1 = S % 10;
		int s2 = S / 10 % 10;
		int s3 = S / 100 % 10;
		
		System.out.println(s1 + s2 + s3);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int S = sc.nextInt(); S sc.nextInt() sc.nextInt sc int s1 = S % 10; s1 S % 10 S 10 int s2 = S / 10 % 10; s2 S / 10 % 10 S / 10 S 10 10 int s3 = S / 100 % 10; s3 S / 100 % 10 S / 100 S 100 10 System.out.println(s1 + s2 + s3) System.out.println System.out System System.out s1 + s2 + s3 s1 + s2 + s3 s1 s2 s3 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
		
		int s1 = S % 10;
		int s2 = S / 10 % 10;
		int s3 = S / 100 % 10;
		
		System.out.println(s1 + s2 + s3);
		
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
		
		int s1 = S % 10;
		int s2 = S / 10 % 10;
		int s3 = S / 100 % 10;
		
		System.out.println(s1 + s2 + s3);
		
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int S = sc.nextInt();
		
		int s1 = S % 10;
		int s2 = S / 10 % 10;
		int s3 = S / 100 % 10;
		
		System.out.println(s1 + s2 + s3);
		
	}
}
