#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[10];
  for (int i = 0; i < 7; i++) cin >> a[i];
  int ans = 0;
  for (int i = 0; i < 7; i++) {
    if (a[i] == 'A') {
      ans += 1;
      continue;
    }
    if (a[i] != '1') {
      ans += a[i] - '0';
    } else {
      ans += (a[i] - '0') * 10 + a[i + 1] - '0';
      i = i + 1;
    }
  }
  cout << ans;
  return 0;
}
