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