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