-----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

Difficulty: interview

Starter code:

Solutions:
s = input()
p = sum(map(int, s[1:])) + 9 * s.count('0') + 1

print(p)


s = input()
ans = 1
skip = 0
for i in range(1, 7):
    if skip:
        skip = 0
        continue
    if i + 1 < 7 and s[i] == '1' and s[i + 1] == '0':
        ans += 10
        skip = 1
    else:
        ans += (ord(s[i]) - ord('0'))
print(ans)


s = input()
pr = 0
ss = 0
for i in range(1, len(s)):
	if (s[i] == '0'):
		pr *= 10
	
	ss += pr
	pr = int(s[i])
ss += pr
print(ss + 1)


s = input()
q = 0
w = 0
for i in range(1, len(s)):
    if (s[i] == '0'):
        q *= 10
    w += q
    q = int(s[i])
w += q
print(w + 1)

s=input()
f=0
c=0
for i in range(1,6):
    if s[i:i+2]=='10':
        c+=10
    else:
        c+=int(s[i])
    #print(s[i:i + 2],c,i)
if(s[6]!='0'):
    c+=int(s[6])
print(c+1)


s = input()
alc = 0
for c in s:
    if c != '0':
        if c == '1':
            alc += 10
        elif '1' < c <= '9':
            alc += ord(c) - ord('0')
        else:
            alc += (lambda x: {'J': 11, 'Q': 12, 'K': 13, 'A': 1}[x])(c)
print(alc)


s = input()
p = 0
t = 0
for i in s[1:]:
	if i == '0':
		p *= 10
	t += p
	p = int(i)
print(t+p+1)

q = str(input())
pr = 0
suf = 0
for i in range(1, len(q)):
	if (q[i] == '0'):
		pr *= 10
	suf += pr
	pr = int(q[i])
suf += pr
print(suf + 1)

s = input()[1:]
print(1+sum(int(x) for x in s)+9*s.count('0'))

ans = 0
for c in input():
    if c == 'A':
        ans += 1
    elif c == '1':
        ans += 10
    else:
        ans += int(c)
print(ans)


s = input()
pos = 1
answer = 0
while (pos < len(s)):
    if (s[pos] == '1'):
        answer += 10
        pos += 2
    else:
        answer += ord(s[pos]) - ord('0') 
        pos += 1
print(1 + answer)

s = input()[1:]
print(1+sum(int(x) for x in s)+9*s.count('0'))

s = input()
pos = 1
answer = 0
while (pos < len(s)):
    if (s[pos] == '1'):
        answer += 10
        pos += 2
    else:
        answer += ord(s[pos]) - ord('0') 
        pos += 1
print(1 + answer)

import re
print(sum(1 if c=='A' else int(c) for c in re.findall(r'10|A|[2-9]', input())))

s = input()
ans = 1
for i in range(1, 7):
    if s[i] == '1':
        ans += 10
        i += 1
    else:
        ans += int(s[i])
print(ans)

print ( __import__("functools").reduce (lambda ans, c: ans + (1 if c == "A" else 10 if c == "1" else int(c)), [0] + list(input())) )

def is_number(s):
    try:
        int(s)
        return True
    except ValueError:
        return False
        
x = input()
ret = 1
for s in x:
	if(is_number(s)):
		if(s == '0'):
			ret = ret + 9
		else:
			ret = ret + int(s)

print(ret)

s = input()
s = s[::-1]
f = 0
for i in range(len(s)):
    if s[i] == 'A':
        x = 1
    else:
        x = int(s[i])
        if x == 0:
            x = 9
    f += x
print(f)


s = [int(c) for c in input()[1:]]
print(1 + sum(s) + 9 * s.count(0))


s = input()[1:]
print(1+sum(int(x) for x in s)+9*s.count('0'))

s = input()
ans = 0
for letter in s[1:] :
    x = int(letter)
    ans += x if x > 0 else 9
print(ans + 1)

s = input()
ans = 1

for i in s[1:]:
    x = int(i)
    if x == 0:
        x = 9
    ans += x
    
print(ans)    
    

      


S = input()[ 1 : ]
ans = 1
for i in range( len( S ) ):
  if S[ i ] == '1':
    ans += 10
  else:
    ans += ord( S[ i ] ) - ord( '0' )
print( ans )


a=list(input())
b=int(0)
for i in range(len(a)):
    if a[i]=="1":
        b+=10
    elif a[i]=="2":
        b+=2
    elif a[i]=="3":
        b+=3
    elif a[i]=="4":
        b+=4
    elif a[i]=="5":
        b+=5
    elif a[i]=="6":
        b+=6
    elif a[i]=="7":
        b+=7
    elif a[i]=="8":
        b+=8
    elif a[i]=="9":
        b+=9
    elif a[i]=="0":
        b+=0
    elif a[i]=="A":
        b+=1
print(int(b))

s=input();ans=0
for i in range(0,len(s)):
    if s[i]=='1':
        ans+=10
    elif s[i]=='A':
        ans+=1
    else:
        ans+=int(s[i])
print(ans)