#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 0;
  string str;
  cin >> str;
  for (int i = 0; i < str.size(); i++) {
    switch (str[i]) {
      case 'A':
        ans++;
        break;
      case '1':
        ans += 10;
        break;
      default:
        ans += str[i] - '0';
        break;
    }
  }
  cout << ans;
  return 0;
}
