#include <bits/stdc++.h>
using namespace std;
int main() {
  char a;
  int sum = 0;
  while (cin >> a) {
    if (a == 'A')
      sum++;
    else if (a == '1')
      sum += 10;
    else
      sum += a - 48;
  }
  cout << sum << endl;
  return 0;
}
