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