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