

Input

The only line of the input is a string of 7 characters. The first character is letter A, followed by 6 digits. The input is guaranteed to be valid (for certain definition of "valid").

Output

Output a single integer.

Examples

Input

A221033


Output

21


Input

A223635


Output

22


Input

A232726


Output

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