#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int ans;
char a[N];
int main() {
  scanf("%s", &a);
  int len = strlen(a);
  for (int i = 0; i < len; i++) {
    if (a[i] == 'A')
      ans++;
    else if (a[i] == '1')
      ans += 10;
    else
      ans += a[i] - '0';
  }
  printf("%d\n", ans);
  return 0;
}
