#include // #include #define rep(i, a, n) for (int i = (int)(a); i <= (int)(n); ++i) #define rrep(i, a, n) for (int i = (int)(a); i >= (int)(n); --i) #define debug(x) cerr << #x << " = " << x << "\n" #define debugv(x) \ rep(f, 0, (x.size() - 1)) cerr << x[f] << (f == (x.size() - 1) ? "\n" : " ") #define debug2(x, y) \ cerr << "(" << #x << "," << #y << ") = " \ << "(" << x << "," << y << ")\n" #define all(x) x.begin(), x.end() #define each(a, x) for (auto &a : (x)) #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) #define int long long #define yn(x) puts((x ? "Yes" : "No")) using namespace std; using pii = pair; using vi = vector; const int MX = 1e5 + 5, INF = 5LL << 57, MOD = 1e9 + 7; int N, M; string S; vi va, vb; void input() { ; cin >> S; ; } void solve() { int ans = 0; for (auto c : S) { ans += (c - '0'); }; cout << ans << endl; ; ; } signed main() { cout << setprecision(12); input(); solve(); return 0; }