import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int ans = N / 100 + N % 100 / 10 + N % 10;

		System.out.println(ans);
		reader.close();
	}


}


 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int ans = N / 100 + N % 100 / 10 + N % 10;

		System.out.println(ans);
		reader.close();
	}


} Main public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int ans = N / 100 + N % 100 / 10 + N % 10;

		System.out.println(ans);
		reader.close();
	} main {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int ans = N / 100 + N % 100 / 10 + N % 10;

		System.out.println(ans);
		reader.close();
	} Scanner reader = new Scanner(System.in); reader new Scanner(System.in) int N = reader.nextInt(); N reader.nextInt() reader.nextInt reader int ans = N / 100 + N % 100 / 10 + N % 10; ans N / 100 + N % 100 / 10 + N % 10 N / 100 + N % 100 / 10 + N % 10 N / 100 N 100 N % 100 / 10 N % 100 N 100 10 N % 10 N 10 System.out.println(ans) System.out.println System.out System System.out ans reader.close() reader.close reader String[] args args public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int ans = N / 100 + N % 100 / 10 + N % 10;

		System.out.println(ans);
		reader.close();
	}


} public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int ans = N / 100 + N % 100 / 10 + N % 10;

		System.out.println(ans);
		reader.close();
	}


} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int ans = N / 100 + N % 100 / 10 + N % 10;

		System.out.println(ans);
		reader.close();
	}


}



