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