#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long int n = 1, cnt = 0;
  for (int i = 1; i < s.length(); i++) {
    if (s[i] == '1')
      cnt++;
    else
      n += s[i] - '0';
  }
  while (cnt != 0) {
    n += 10;
    cnt--;
  }
  cout << n << endl;
  return 0;
}
