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