#include <cstdio> int main() { long long num; scanf("%lld",&num); int sum = 0; while (num != 0) { sum += num % 10; num /= 10; } printf("%d",sum); }