#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimization("O2")
#pragma GCC optimization("unroll-loops")
const long double ERR = 1e-5;
const int MOD = 1e9 + 7;
bool areEqual(long double _n1, long double _n2) {
  return fabs(_n1 - _n2) < ERR;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string S;
  cin >> S;
  int RES = 1;
  for (int i = 1; i < S.length(); i++) {
    if (S[i] == '1') {
      i++;
      RES += 10;
    } else
      RES += S[i] - '0';
  }
  cout << RES << '\n';
}
