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