#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string str;
  cin >> str;
  int sum = 0;
  for (int i = 1; i < str.size(); i++) {
    if (str[i] == '0') {
      sum += 9;
    } else {
      sum += (str[i] - '0');
    }
  }
  cout << sum + 1 << endl;
  return 0;
}
