#include <bits/stdc++.h>
int main() {
  int i, s = 0;
  char a[10];
  gets(a);
  for (i = 0; i < strlen(a); i++) {
    if (a[i] == 'A') {
      s += 1;
    }
    if (a[i] == '2') {
      s += 2;
    }
    if (a[i] == '3') {
      s += 3;
    }
    if (a[i] == '4') {
      s += 4;
    }
    if (a[i] == '5') {
      s += 5;
    }
    if (a[i] == '6') {
      s += 6;
    }
    if (a[i] == '7') {
      s += 7;
    }
    if (a[i] == '8') {
      s += 8;
    }
    if (a[i] == '9') {
      s += 9;
    }
    if (a[i] == '1') {
      s += 10;
    }
  }
  printf("%d", s);
  return 0;
}
