#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  a = abs(a);
  b = abs(b);
  if (!b) return a;
  return __gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / __gcd(a, b)) * b;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string a;
  cin >> a;
  int ans = 1;
  for (int i = 1; i < 7; i++) {
    if (a[i] == '1')
      ans += 10;
    else
      ans += (a[i] - '0');
  }
  cout << ans << "\n";
  return 0;
}
