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