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