#include <bits/stdc++.h>
using namespace std;
struct dbg_ {
  template <typename T>
  dbg_& operator,(const T& x) {
    cerr << x << ' ';
    return *this;
  }
} dbg_t;
struct cin_ {
  template <typename T>
  cin_& operator,(T& x) {
    cin >> x;
    return *this;
  }
} cin_;
template <typename T1, typename T2>
static inline ostream& operator<<(ostream& os, std::pair<T1, T2> const& p) {
  os << "{" << p.first << ", " << p.second << "}";
  return os;
}
int main() {
  string str;
  getline(cin, str);
  int ret = 1;
  for (int i = (1), _i = (7); i < _i; ++i) {
    ret += str[i] - '0';
    if (str[i] == '0') ret += 9;
  }
  cout << ret << endl;
  return 0;
}
