#include <bits/stdc++.h>
using namespace std;
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> s;
  int ret = 1;
  for (auto& r : s) {
    if (r >= '1' && r <= '9') ret += r - '0';
    if (r == '0') ret += 9;
  }
  cout << ret << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
