#include <bits/stdc++.h> #include #include #include #include #include #include #include using namespace std; long long int n, sum; int main() { scanf("%d", &n); while (n != 0) { sum += n % 10; n = n / 10; } cout << sum; }