#include <bits/stdc++.h>
using namespace std;
char a, b;
int ans = 1;
int main() {
  cin >> a;
  for (int i = 1; i <= 6; i++) {
    cin >> b;
    if (b != '1')
      ans = ans + b - '0';
    else
      ans += 10;
  }
  cout << ans << endl;
  return 0;
}
