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