#include <bits/stdc++.h>
using namespace std;
int main() {
  string n;
  cin >> n;
  int m = 1;
  for (int i = 1; i <= 6; i++) {
    if (n[i] == '0') {
      m = m + 9;
    } else {
      m += n[i] - 48;
    }
  }
  cout << m << endl;
  return 0;
}
