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