#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const int mod = 1000000007;
int lowbit(int x) { return x & (-x); }
int fast_power(int a, int b) {
  int x;
  for (x = 1; b; b >>= 1) {
    if (b & 1) x = 1ll * x * a % mod;
    a = 1ll * a * a % mod;
  }
  return x % mod;
}
char st[100005];
int main() {
  scanf("%s", st);
  int len = strlen(st);
  int ans = 0;
  for (int i = 0; i <= len - 1; i++) {
    if (st[i] == '1')
      ans += 10;
    else if (st[i] == 'A')
      ans += 1;
    else
      ans += st[i] - '0';
  }
  printf("%d\n", ans);
  return 0;
}
