#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
long double btod(string a) {
  long double i, c = (int)a.size() - 1, s = 0, d = 0;
  for (i = c; i >= 0; i--) {
    a[i] -= 48;
    s += a[i] * pow(2, d);
    d++;
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string a;
  cin >> a;
  int i, s = 0;
  for (i = 0; i < (int)a.size(); i++) {
    if (a[i] == 'A')
      s++;
    else if (a[i] == '1')
      s += 10;
    else
      s += (a[i] - '0');
  }
  cout << s << '\n';
}
