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