#include <bits/stdc++.h>
using namespace std;
int main() {
  char a;
  cin >> a;
  int b;
  cin >> b;
  int ans = 0, d;
  while (b > 0) {
    d = b % 10;
    if (d == 1) {
      ans += 10;
    } else
      ans += d;
    b /= 10;
  }
  cout << ans + 1 << endl;
}
