#include <bits/stdc++.h>
int main() {
  char a[9], wast;
  int b[9], sum = 0;
  scanf("A");
  for (int i = 0; i < 6; i++) {
    scanf("%c", &a[i]);
    if (a[i] != '1')
      b[i] = a[i] - 48;
    else
      b[i] = 10;
  }
  for (int i = 0; i < 6; i++) sum += b[i];
  printf("%d", sum + 1);
  return 0;
}
