#include <bits/stdc++.h>
using namespace std;
struct __s {
  __s() {
    srand(time(NULL));
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
long long f(char c) { return c - '0'; }
int main(void) {
  string s;
  cin >> s;
  long long ans = 1;
  for (long long i = 1; i < (long long)(s.size()); i++) {
    if (s[i] == '0')
      ans += 9;
    else
      ans += f(s[i]);
  }
  cout << ans << '\n';
  return 0;
}
