#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = 10 * x + ch - '0';
    ch = getchar();
  }
  return x * f;
}
char ch[50];
int main() {
  scanf("%s", ch);
  int ans = 0;
  int len = strlen(ch);
  for (int i = 0; i < len; i++) {
    if (ch[i] == 'A')
      ans += 1;
    else if (ch[i] == '1' && ch[i + 1] == '0')
      ans += 10;
    else
      ans += ch[i] - '0';
  }
  cout << ans << endl;
}
