#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k = 0, l, m, n, ans = 0;
  string s;
  cin >> s;
  for (i = 1; i < s.size(); i++) {
    if (s[i] == '0') k++;
  }
  if (k > 0) ans = ans + k * 10;
  for (i = 1; i < s.size(); i++) {
    if (s[i] != '0' && s[i] != '1') {
      ans = ans + (s[i] - '0');
    }
  }
  cout << ans + 1;
}
