import java.util.Scanner;
public class AddingDigitOfINt{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter an Integer between 1 and 1000");
int num = sc.nextInt();
int sum=0;
while(num>1){
int temp = num%10;
sum = sum+temp;
num = num/10;
}
System.out.println("Sum of all digits of the given number is = "+sum);
}
}