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