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