#include <bits/stdc++.h>
using namespace std;
char s[20];
int main() {
  int sum = 0;
  scanf("%s", s);
  for (int i = 0; i < strlen(s); i++) {
    if (s[i] == 'A') sum += 1;
    if (s[i] == '1') sum += 10;
    if (s[i] != 'A' && s[i] != '1') sum += s[i] - '0';
  }
  cout << sum;
  return 0;
}
