#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  char c;
  int sum = 0;
  for (int i = 1; i <= 7; i++) {
    cin >> c;
    if (c == 'A')
      sum++;
    else if (c != '1')
      sum += c - '0';
    else {
      cin >> c;
      i++;
      sum += 10 + c - '0';
    }
  }
  cout << sum << endl;
  return 0;
}
