#include <bits/stdc++.h>
using namespace std;
char str[10];
int main() {
  int sum = 0;
  while (~scanf("%s", str)) {
    int len = strlen(str);
    for (int i = 0; i < len; ++i) {
      if (str[i] == '1') {
        sum += 10;
        ++i;
      } else if (str[i] >= '2' && str[i] <= '9') {
        sum += str[i] - '0';
      }
    }
    printf("%d\n", sum + 1);
  }
  return 0;
}
