#include <iostream>
using namespace std;
int main()
{
int num;
int sum = 0;
cout << "Please type any non-negative integer: ";
cin >> num;
while ( num > 0 ) {
sum += num % 10;
num /= 10;
}
cout << "The sum of the digits of " << num << " is " << sum << "\n";
return 0;
}