#include <bits/stdc++.h>
using namespace std;
inline int nextint(void) {
  int k;
  cin >> k;
  return k;
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long cnt = 0;
  string str;
  cin >> str;
  for (int i = 0; i < str.length(); i++)
    if (str[i] == 'A')
      cnt += 1;
    else if (str[i] == '1')
      cnt += 10;
    else
      cnt += str[i] - '0';
  cout << cnt;
  return 0;
}
