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

Starter code:

Solutions:
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()
p = 0
t = 0
for i in s[1:]:
	if i == '0':
		p *= 10
	t += p
	p = int(i)
print(t + p + 1)


s = list(input())
if s[-1] == '\n':
	s.pop()
ans = 1
for i in range(1, 7):
	d = int(s[i])
	if d == 1:
		ans += 10
	else:
		ans += d
print(ans)


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()
t = int(0)
for i in range(1, 7):
	if s[i] == '1':
		t += 10
	else:
		a = int(s[i])
		t += a
print(t + 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()
res = 1
for i in range(1, 7):
	if s[i] == '1':
		res += 10
		i += 1
	else:
		res += int(s[i])
print(res)


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


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


a = list(input())
s = 0
for i in a:
	if i == 'A':
		s += 1
	elif i == '1':
		s += 10
	else:
		s += int(i)
print(s)


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 = 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('10|A|[2-9]', input()))))


bj = str(input())
points = 1
for h in range(1, 7):
	if int(bj[h]) > 1:
		points += int(bj[h])
	elif int(bj[h]) == 1:
		points += 10
print(points)


a = input()
s = 1
for i in range(1, len(a)):
	if a[i] == '0':
		s = s + 9
	else:
		s = s + int(a[i])
print(s)


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


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


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 = input()
s = 1
for i in a[1:]:
	if i == '1':
		s = s + 10
	else:
		s = s + int(i)
print(s)


ans = 0
for c in input():
	if c == 'A':
		ans += 1
	elif c == '1':
		ans += 10
	else:
		ans += int(c)
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)


nums = input()
counter = 0
for i in nums:
	if i == 'A':
		counter += 1
	elif i == '1':
		counter += 10
	else:
		counter += int(i)
print(counter)


def f(n):
	if n == 'A':
		return 1
	if n == '1':
		return 10
	return int(n)
print(sum(map(f, input())))


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)


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


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])
if s[6] != '0':
	c += int(s[6])
print(c + 1)


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


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


s = input()[1:]
ans = 1
i = 0
while i < len(s):
	if s[i] == '1':
		ans += 10
		i += 2
	else:
		ans += int(s[i])
		i += 1
print(ans)


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)


n = input()
sum = 0
for i in range(len(n)):
	if n[i] == 'A':
		sum = sum + 1
	elif n[i] == '1':
		sum = sum + 10
	else:
		sum = sum + int(n[i])
print(sum)


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)