#include <bits/stdc++.h>
using namespace std;
int main() {
  string input;
  int tampung = 1;
  cin >> input;
  for (int i = 1; i < input.length(); i++) {
    if (input[i] != '1')
      tampung += stoi(input.substr(i, 1));
    else {
      tampung += 10;
      i++;
    }
  }
  cout << tampung;
  return 0;
}
