#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
int main(){
    string s;
    cin >> s;
    int ans = 0;
    for(char &i : s){
        if(i == '0') ans += 10;
        else ans += i - '0';
    }
    cout << ans << endl;
    return 0;
}