#include <bits/stdc++.h>
using namespace std;
string arr;
int len, ans = 0;
int f = -1;
int main() {
  cin >> arr;
  len = arr.size();
  for (int i = 0; i < len; i++) {
    if (arr[i] >= '0' && arr[i] <= '9' && arr[i] != '1')
      ans += arr[i] - '0';
    else if (arr[i] == '1')
      ans += 10;
    else if (arr[i] == 'A')
      ans += 1;
  }
  cout << ans;
  return 0;
}
