#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int sum = 0, ff = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (isdigit(ch)) sum = sum * 10 + (ch ^ 48), ch = getchar();
  return sum * ff;
}
char ch[1000005];
int n, ans;
int main() {
  scanf("%s", ch + 1);
  n = strlen(ch + 1);
  for (int i = 1; i <= n; i++) {
    if (ch[i] == 'A')
      ans += 1;
    else if (ch[i] == '1')
      ans += 10;
    else
      ans += (ch[i] ^ 48);
  }
  printf("%d\n", ans);
  return 0;
}
