#include <bits/stdc++.h>
using namespace std;
string a;
long long n = 0;
int main() {
  cin >> a;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == 'A')
      n++;
    else if (a[i] == '1')
      n += 10;
    else
      n += (a[i] - 48);
  }
  cout << n << endl;
  return 0;
}
