#include <bits/stdc++.h>
using namespace std;
char a[10];
int sum;
int main() {
  for (int i = 1; i <= 7; i++) cin >> a[i];
  for (int j = 1; j <= 7; j++) {
    if (a[j] == 'A')
      sum += 1;
    else if (a[j] == '1') {
      sum += 10;
    } else
      sum += a[j] - '0';
  }
  cout << sum << endl;
  return 0;
}
