int i=new Scanner(System.in).nextInt();
int sum=0;
while(i%10!=0){
sum+=i%10;
i=i/10;
}
System.out.println(sum);
public void main(int number){
int bai = number / 100;
int shi = (number % 100) / 10;
int ge = (number % 10);
System.out.print("sum="+(bai+shi+ge));
}