#include <bits/stdc++.h>
using namespace std;
long long mul(long long a, long long b) { return (a * b) % (100000007); }
long long add(long long a, long long b) { return (a + b) % (100000007); }
long long sub(long long a, long long b) {
  return (a - b + llabs(a - b) / (100000007) * (100000007) + (100000007)) %
         (100000007);
}
void upd(long long &a, long long b) {
  a = (a % (100000007) + b % (100000007)) % (100000007);
}
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  char s[100];
  cin >> s;
  int i = 0, ans = 0;
  while (i < strlen(s)) {
    if (s[i] == 'A')
      ans++;
    else if (s[i] == '1')
      ans += 10, i++;
    else if (isdigit(s[i]))
      ans += s[i] - '0';
    ++i;
  }
  cout << ans << endl;
  return 0;
}
